date intervals for graphs

M

Marcelo Barbudas

Hi,

I'm in a position where I have to create dynamic date based Line graphs.
By dynamic I mean the start and end dates are variable and the output
should depend on the time period.

For example if the date interval is 7 days I would have to display 7
points of data. If the date interval is 100 days I would have to display
it by months since 100 points of data would be too much. It has to be
grouped somehow.

Is there a library that does this automatically?

If not, what would be the best solution for such a problem?

I was thinking making 1 data point = 1 day. Then arbitrarily choose that
I want to display a max amount of 15 points per graph. Get the data for
those 15 points and plot the graph according to that.

What problems could appear with this version?
 
R

Rob Biedenharn

Hi,

I'm in a position where I have to create dynamic date based Line
graphs. By dynamic I mean the start and end dates are variable and
the output should depend on the time period.

For example if the date interval is 7 days I would have to display 7
points of data. If the date interval is 100 days I would have to
display it by months since 100 points of data would be too much. It
has to be grouped somehow.

Is there a library that does this automatically?

If not, what would be the best solution for such a problem?

I was thinking making 1 data point = 1 day. Then arbitrarily choose
that I want to display a max amount of 15 points per graph. Get the
data for those 15 points and plot the graph according to that.

What problems could appear with this version?


gruff or GoogleCharts, perhaps?

The grouping part (and the criteria for going from discrete to
"grouped" points) would be up to you.

-Rob

Rob Biedenharn http://agileconsultingllc.com
(e-mail address removed)
 
M

Mark Thomas

Hi,

I'm in a position where I have to create dynamic date based Line graphs.
By dynamic I mean the start and end dates are variable and the output
should depend on the time period.

For example if the date interval is 7 days I would have to display 7
points of data. If the date interval is 100 days I would have to display
it by months since 100 points of data would be too much. It has to be
grouped somehow.

Is there a library that does this automatically?

If not, what would be the best solution for such a problem?

I was thinking making 1 data point = 1 day. Then arbitrarily choose that
I want to display a max amount of 15 points per graph. Get the data for
those 15 points and plot the graph according to that.

What problems could appear with this version?

Why is 100 points too much? If your graph will be 200 pixels wide or
more, you've got room for them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top