You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function isChartEmpty throws a type error when validating data that has gaps, or, null values. The error originates during the first filter of isChartEmpty, TypeError: Cannot read property 'X' of null. The data I'm using is a mix of integers and null values. e.g., [3, 6, null, 12].
Null data means no data, right? Not necessarily. Null is a proper way to represent a gap in the data.
For example, showing run times for a given task. If a point does not have a time value, a value of zero would indicate that the given task took literally no time. Null would indicate that the task did not finish, resulting in a gap in the data.
I'm not sure what Chart.js supported when this plugin was created, but Chart.js currently allows gaps during rendering when a specific property is set. (see Dataset Properties -> spanGaps) Even if spanGaps is not enabled, Chart.js will attempt to skip gaps, effectively merging data around a given gap.
So my bug report-slash-feature request is gap support. If the spanGaps property is set in the Chart.js config (globally or on an individual dataset), allow nulls in the data.
The text was updated successfully, but these errors were encountered:
The function isChartEmpty throws a type error when validating data that has gaps, or, null values. The error originates during the first filter of isChartEmpty,
TypeError: Cannot read property 'X' of null
. The data I'm using is a mix of integers and null values. e.g., [3, 6, null, 12].Null data means no data, right? Not necessarily. Null is a proper way to represent a gap in the data.
For example, showing run times for a given task. If a point does not have a time value, a value of zero would indicate that the given task took literally no time. Null would indicate that the task did not finish, resulting in a gap in the data.
I'm not sure what Chart.js supported when this plugin was created, but Chart.js currently allows gaps during rendering when a specific property is set. (see Dataset Properties -> spanGaps) Even if spanGaps is not enabled, Chart.js will attempt to skip gaps, effectively merging data around a given gap.
So my bug report-slash-feature request is gap support. If the spanGaps property is set in the Chart.js config (globally or on an individual dataset), allow nulls in the data.
The text was updated successfully, but these errors were encountered: