Sign in to follow this  
jbruce

Best strategy for time-based line chart with sparse data

Recommended Posts

I'm looking to create a "line chart" graphing values over time. The xaxis precision needs to be "per day", and the period is 3 years, but there's really only a couple "data points".

 

What is the best strategy to create such a chart? A traditional "line chart" seems like it would need 365*3 "data" values, where most are "null". I may only have 3 actual data values over the entire period, the first value, the max value and the final value, but I need to show the precision of the specific day on the xaxis. If I created a traditional "line chart" and provided 3 data values, the xaxis would simply divide into 3 "labels". I want the xaxis to show a time period of 3 years where on some particular day, a value is set. Then a line is drawn from the origin to that data point and then to the final data point (at the 3-year mark).

 

I also don't really want the the xaxis labels in "days". I really want to label it in years, showing "0", "1", "2", and "3".

 

Scatter plots have a better notion of sparse data, but I need the lines to connect the points. Any ideas on the best strategy to get what I want?

 

Share this post


Link to post
Share on other sites

I'm looking to create a "line chart" graphing values over time. The xaxis precision needs to be "per day", and the period is 3 years, but there's really only a couple "data points".

 

What is the best strategy to create such a chart? A traditional "line chart" seems like it would need 365*3 "data" values, where most are "null". I may only have 3 actual data values over the entire period, the first value, the max value and the final value, but I need to show the precision of the specific day on the xaxis. If I created a traditional "line chart" and provided 3 data values, the xaxis would simply divide into 3 "labels". I want the xaxis to show a time period of 3 years where on some particular day, a value is set. Then a line is drawn from the origin to that data point and then to the final data point (at the 3-year mark).

 

I also don't really want the the xaxis labels in "days". I really want to label it in years, showing "0", "1", "2", and "3".

 

Scatter plots have a better notion of sparse data, but I need the lines to connect the points. Any ideas on the best strategy to get what I want?

Hi,

 

Welcome to FusionCharts Forum! :)

 

We completely did not understand your requirement, but the much we could comprehend, it seems the Scatter XY plot chart might cater to your requirement.

 

Also, you can connect the scatter points by setting "drawLine" attribute to "1" to in the corresponding dataset elements.

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Yes, the Scatter chart seems to be the best choice.

 

I apologize if I was unclear, so let me try to rephrase. The issue was that I have some data, say "temperature" that I want to graph over time. I want to see the graph over a whole year, so 365 days, but I may only have a few days where I actually have the temperatures. For example, I may have the 10th, 123rd, and 199th day temperature. It seemed wasteful to setup a dataset that included 365 days when I only had data for 3 days. So, I was looking for a way to just specify the 3 data values that I had, but I also needed to have the values connected via a line.

 

Scatter chart chart with the "drawLine" seems to be the best solution for this situation. Thanks for your help.

Share this post


Link to post
Share on other sites

Yes, the Scatter chart seems to be the best choice.

 

I apologize if I was unclear, so let me try to rephrase. The issue was that I have some data, say "temperature" that I want to graph over time. I want to see the graph over a whole year, so 365 days, but I may only have a few days where I actually have the temperatures. For example, I may have the 10th, 123rd, and 199th day temperature. It seemed wasteful to setup a dataset that included 365 days when I only had data for 3 days. So, I was looking for a way to just specify the 3 data values that I had, but I also needed to have the values connected via a line.

 

Scatter chart chart with the "drawLine" seems to be the best solution for this situation. Thanks for your help.

We are glad that your requirement is resolved.

 

Happy FusionCharting! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this