c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.33k stars 1.39k forks source link

Dashed line (region) shows solid trailing line for null points #2813

Open PT10 opened 3 years ago

PT10 commented 3 years ago

c3 version: 0.7.18 (Latest also has this issue) d3 version: 4.9.1

Following issue (even reproducible in the online Line chart example at https://c3js.org/samples/simple_regions.html)

In my data series I have few trailing nulls. I want to show a dashed line for all the non null data points. But when I use the following configuration, the chart shows a solid line for the null points followed by the dashed line.

Just copy paste the below in the online example and you will see this issue getting reproduced.

var chart = c3.generate({ data: { columns: [ ['data2', null, null, null, 40, 15, 25, -100] ], regions: { 'data2': [{'start':3}] } } });