Need a special offer?Find out if your project fits.
+

Is there a best practice for making time series with missing data?

Answered
Randolph Kepplinger asked on February 13, 2020

Hello
 
Lets say I have values
2020 20
2021 21
2022 no value
2023 no value
2024 26
 
and I want a line chart with missing values, but the years 2022,2023 present - how can this be done?
 
kind regards
 
Randolph
 

5 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster February 14, 2020

Hello, Randolph,
 
Thank you for reaching out to us.
 
Our team recommends using the showEmptyValues property of the grid object. The grid object itself is a property of the options object.
 
Setting its value to true allows displaying empty values both on the grid and on the charts, including the line chart.
 
Please see an example we have prepared for you.
 
We hope it helps.
 
Best regards,
Illia

Public
Mantas June 1, 2022

I have very similar problem, which is visible in example too:
2022 no value
2023 no value
I want to show nothing (line goes to axis) instead of direct line from 2021 to 2024. How can I do that?

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster June 2, 2022

Hello, Mantas!
 
Thank you for your question.
 
We kindly suggest two ways to achieve such data visualization:

  1. Using calculated values to replace empty sells with 0 both on the grid and Flexmonster charts: https://jsfiddle.net/flexmonster/Ler6d9pn/.
  2. Connecting to any third-party charting library and using getData() API call to preprocess the empty cells only for charts.
    Here is an example with Highcharts: https://jsfiddle.net/flexmonster/wbs7n5o3/.

 
We hope it helps.
Feel free to ask in case of any other questions.
 
Regards,
Solomiia

Public
Mantas June 2, 2022

Thank you, I did very similar approach, as you suggested in 1:
I left outer joined data to ALL days in period. Of course, there are much more data to send and analyze, but it works.

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster June 2, 2022

Hello, Mantas!

Thank you for your swift response.

We are glad to hear that you managed to configure the desired data visualization.

You are welcome to contact us in case of any other questions.

Regards,
Solomiia

Please login or Register to Submit Answer