Skip to content

Commit

Permalink
chore: do not show 0 on series label (#5419)
Browse files Browse the repository at this point in the history
Signed-off-by: yuda <yuda@megazone.com>
  • Loading branch information
yuda110 authored Jan 3, 2025
1 parent 753f2e3 commit 8f3557e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ const drawChart = (rawData: WidgetLoadResponse|null) => {
rotate: widgetOptionsState.displaySeriesLabelInfo?.rotate,
fontSize: 10,
formatter: (p) => {
if (!p.value) return '';
const columnFieldForPivot = state.dataTable?.options.PIVOT?.fields?.column;
const fieldName = (state.isPivotDataTable && columnFieldForPivot) ? columnFieldForPivot : _dataFields;
const numberFormat = widgetOptionsState.numberFormatInfo[fieldName];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ const drawChart = (rawData?: WidgetLoadResponse|null) => {
rotate: widgetOptionsState.displaySeriesLabelInfo?.rotate,
fontSize: 10,
formatter: (p) => {
if (!p.value) return '';
const columnFieldForPivot = state.dataTable?.options.PIVOT?.fields?.column;
const fieldName = (state.isPivotDataTable && columnFieldForPivot) ? columnFieldForPivot : _dataField;
const numberFormat = widgetOptionsState.numberFormatInfo[fieldName];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ const drawChart = (rawData?: WidgetLoadResponse|null) => {
rotate: widgetOptionsState.displaySeriesLabelInfo?.rotate,
fontSize: 10,
formatter: (p) => {
if (!p.value) return '';
const columnFieldForPivot = state.dataTable?.options.PIVOT?.fields?.column;
const fieldName = (state.isPivotDataTable && columnFieldForPivot) ? columnFieldForPivot : _dataField;
const numberFormat = widgetOptionsState.numberFormatInfo[fieldName];
Expand Down

0 comments on commit 8f3557e

Please sign in to comment.