Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PT10 opened this issue Sep 7, 2020 · 0 comments
Open

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

PT10 opened this issue Sep 7, 2020 · 0 comments

Comments

@PT10
Copy link
Contributor

PT10 commented Sep 7, 2020

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}]
}
}
});

PT10 added a commit to PT10/c3 that referenced this issue Sep 7, 2020
Checking if the value is null before plotting the line region (dashed line). If the value is null then there is no need to add the point in the SVG path. Without this check chart plots a solid line for data points with null value. Please refer to the description in the issue c3js#2813.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant