Skip to content

Commit

Permalink
fix yAxis min value for area series
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzmadom committed Dec 17, 2023
1 parent ad2f5c5 commit 8257298
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/d3/renderer/hooks/useChartOptions/y-axis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ const getAxisLabelMaxWidth = (args: {axis: PreparedAxis; series: ChartKitWidgetS

function getAxisMin(axis?: ChartKitWidgetAxis, series?: ChartKitWidgetSeries[]) {
const min = axis?.min;
const seriesWithVolume = ['bar-x', 'area'];

if (typeof min === 'undefined' && series?.some((s) => s.type === 'bar-x')) {
if (typeof min === 'undefined' && series?.some((s) => seriesWithVolume.includes(s.type))) {
return 0;
}

Expand Down

0 comments on commit 8257298

Please sign in to comment.