-
Notifications
You must be signed in to change notification settings - Fork 28
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
Line chart: Empty values are rendered as 0 #46
Comments
Couldn't you filter out these results in the datasource microflow? These sort of cases is one of the main reasons it uses a microflow as datasource, as opposed to xpath where it's much harder to get around this. |
In the latest release, I am able to make this work quite easily. However, I have to change some code for it. As this includes the comment "Convert to integer, so the stackedbar doesnt break!", I am afraid that this might break something else though. var pointvalue = set.points[i].get(this.seriesylabel);
if (pointvalue == "") {
pointvalue = null;
}
points.push(pointvalue);
// points.push(+(set.points[i].get(this.seriesylabel))); // Convert to integer, so the stackedbar doesnt break!``` |
@meertens thanks, I'll have a look at it this week |
An improvement that also works with Decimals (that was probably what the comment was for): var pointvalue = set.points[i].get(this.seriesylabel);
if (pointvalue == "") {
points.push(null);
} else {
points.push(+pointvalue); // Convert to number, so the stackedbar doesnt break!
} |
We would like empty values in the data points to not show, instead of 0 as a value. This would be a more correct representation of our data (data points with 0 might be correct measurements. empty data points mean the measurement is missing).
The simpleChart widget used to handle it this way.
According to http://stackoverflow.com/questions/30462042/line-chartjs-empty-null-values-doesnt-break-the-line/30478786#30478786 it should be possible with ChartJS.
The text was updated successfully, but these errors were encountered: