Remove nulls option #33042
richardfogaca
started this conversation in
Ideas
Remove nulls option
#33042
Replies: 1 comment 1 reply
-
I'm all for it! The only thing I'd note to consider is that the Advanced Analytics section has the zero-imputation infill rule. They're somewhat cognitively related, so I can't help but wonder if they should live together, i.e. a "Null values display" control with options for "remove" "treat as 0" or... I guess "default treatment" if that makes sense? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Remove Null Values in Timeseries Charts
Contribution Summary
Added a new control option
removeNullValues
to Timeseries charts that allows users to control how null values are handled in their visualizations. When enabled, lines will connect across null values instead of breaking at those points. The demo has been implemented in the Line chart type but can be extended to Bar and Mixed charts as well.How It Works
The
removeNullValues
control is implemented as a checkbox in the Chart Options section of the control panel. When enabled, it setsconnectNulls: true
in the ECharts configuration for line series. This tells ECharts to connect data points across null values, creating a continuous line even when there are gaps in the data.The implementation consists of two parts:
transformProps.ts
that applies theconnectNulls
setting to the chart configurationScreenshot
Before
After
Control
Fork with working prototype
The implementation is available in this fork
Chart containing null data
remove nulls.zip
Why This Matters
Handling null values effectively is crucial for data visualization, especially in time series data where gaps can occur due to various reasons (missing data, irregular sampling, etc.). This improvement:
Beta Was this translation helpful? Give feedback.
All reactions