Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed May 10, 2021
1 parent 80d4010 commit 65cebcc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/plugin-chart-echarts/src/Gauge/transformProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ export default function transformProps(chartProps: ChartProps) {
const numberFormatter = getNumberFormatter(numberFormat);
const colorFn = CategoricalColorNamespace.getScale(colorScheme as string);
const axisLineWidth = calculateAxisLineWidth(data, fontSize, overlap);
const axisLabels = range(minVal, maxVal, (maxVal - minVal) / splitNumber);
const axisLabelLength = Math.max(
...axisLabels.map(label => numberFormatter(label).length).concat([1]),
);
const formatValue = (value: number) => valueFormatter.replace('{value}', numberFormatter(value));
const axisTickLength = FONT_SIZE_MULTIPLIERS.axisTickLength * fontSize;
const splitLineLength = FONT_SIZE_MULTIPLIERS.splitLineLength * fontSize;
Expand All @@ -135,6 +131,10 @@ export default function transformProps(chartProps: ChartProps) {
}));
const min = minVal ?? calculateMin(transformedData);
const max = maxVal ?? calculateMax(transformedData);
const axisLabels = range(min, max, (max - min) / splitNumber);
const axisLabelLength = Math.max(
...axisLabels.map(label => numberFormatter(label).length).concat([1]),
);
const normalizer = max;
const intervalBoundsAndColors = setIntervalBoundsAndColors(
intervals,
Expand Down

0 comments on commit 65cebcc

Please sign in to comment.