Describe the bug
When the bar chart is set to histogram mode and the x Axis has a time scale, then when a bar value is 0 the bar itself is not rendered, while its value labels is, overlapping other bars values:

To Reproduce
Steps to reproduce the behavior:
- Change the
stories/bar/17_time_stacked.tsx as follow:
<Chart className="story-chart">
<Settings
debug={boolean('debug', false)}
theme={{
barSeriesStyle: { displayValue: { fill: 'white', fontSize: 25 } },
}}
/>
...
<BarSeries
id={KIBANA_METRICS.metrics.kibana_os_load[2].metric.label}
xScaleType={ScaleType.Time}
yScaleType={ScaleType.Linear}
xAccessor={0}
yAccessors={[1]}
stackAccessors={[0]}
data={KIBANA_METRICS.metrics.kibana_os_load[2].data.slice(0, 20)}
displayValueSettings={{
showValueLabel: true,
isAlternatingValueLabel: false,
isValueContainedInElement: true,
hideClippedValue: true,
}}
/>
<BarSeries
id={KIBANA_METRICS.metrics.kibana_os_load[1].metric.label}
xScaleType={ScaleType.Time}
yScaleType={ScaleType.Linear}
xAccessor={0}
yAccessors={[1]}
stackAccessors={[0]}
data={KIBANA_METRICS.metrics.kibana_os_load[1].data.slice(0, 20)}
displayValueSettings={{
showValueLabel: true,
isAlternatingValueLabel: false,
isValueContainedInElement: true,
hideClippedValue: true,
}}
/>
<BarSeries
id={KIBANA_METRICS.metrics.kibana_os_load[0].metric.label}
xScaleType={ScaleType.Time}
yScaleType={ScaleType.Linear}
xAccessor={0}
yAccessors={[1]}
stackAccessors={[0]}
data={KIBANA_METRICS.metrics.kibana_os_load[0].data.slice(0, 20)}
displayValueSettings={{
showValueLabel: true,
isAlternatingValueLabel: false,
isValueContainedInElement: true,
hideClippedValue: true,
}}
/>
</Chart>
- Now change lines 38 to 49 in the
src/utils/data_samples/test_dataset_kibana.ts as follow:
data: [
[1551438000000, 0],
[1551438030000, 0],
[1551438060000, 0],
[1551438090000, 0],
[1551438120000, 0],
[1551438150000, 0],
[1551438180000, 0],
[1551438210000, 0],
[1551438240000, 0],
[1551438270000, 0],
[1551438300000, 0],
- Start Storybook and go to 'Bar Chart - Time Stacked Using Various Specs'
- See picture above
Expected behaviour
The 0 value labels are not rendered.
Additional context
Add any other context about the problem here.
Errors in browser console
No errors.
Kibana related PR
Describe the bug
When the bar chart is set to histogram mode and the x Axis has a
timescale, then when a bar value is 0 the bar itself is not rendered, while its value labels is, overlapping other bars values:To Reproduce
Steps to reproduce the behavior:
stories/bar/17_time_stacked.tsxas follow:src/utils/data_samples/test_dataset_kibana.tsas follow:Expected behaviour
The 0 value labels are not rendered.
Additional context
Add any other context about the problem here.
Errors in browser console
No errors.
Kibana related PR