Jump to content
Software FX Community

Un-even time based series items


cleghornp
 Share

Recommended Posts

We have been using Chartfx for quite some years now and have run into major limitations in how chartfx actually gets data.

We now use a system of exception reporting to save our system data. That means that for a given series over the day if there have only been 2 changes only 2 data items are stored in the database. Another series item may have changes 300 times for the same period so trying to plot both these series items together with Chart fx means that we MUST create arrays of the same size. This has an obvious performance drawback. We have been experimenting with other charting solutions, such as Dundas chart, and they allow for direct assignment of such uneven data series items.

Perhaps we have been doing this wrong for the years we. If so, could someone advise. I will give an example of the data.

Series 1

 Timestamp   Data

28/4/2006 04:12:45     23.43

28/4/2006 12:19:22     29.43

Series 2

 Timestamp   Data

28/4/2006 01:11:31     94.12

28/4/2006 02:34:58     86.12

28/4/2006 03:17:44     91.12

28/4/2006 04:55:32     80.12

28/4/2006 05:17:51     80.12

28/4/2006 06:41:12     90.12

28/4/2006 07:38:27     80.12

28/4/2006 08:18:01     71.12

28/4/2006 09:27:45     100.12

Many thanks

Link to comment
Share on other sites

We have been using the API to add the points in code as we could not find out how to add them via data sets or any other manner.

All the chartfx documentation talks about equal numbers of x and  Y points per series so how do you do this?

 

The number of data points depends. We could have 1 series with 86000 points per day and another with only 30 for the same time period. The problem is we are having to pad out the series with only 30 points into the full 86000 to match the other series. That's the performance issue.

Link to comment
Share on other sites

How does your DataSet looks like?

Is it something like:

Date Value SeriesId

?

If so, you can use the Cross-Tab data provider to automatomatically build your chart. We added a new setting: RowHeadingsSettings.CompressedXValues, that allows you to do this. I wrote the foolowing KB article to illustrate it:

http://support.softwarefx.com/ShowArticleSep.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/760/1/009.htm

You can also continue to use the API, you don't have to do any padding tough, all you need to do is:

for (int i 0; i < n; i++) {

  chart.Data.X[0,i] = <x>;

  chart.Data.Y[0,i] = <y>;

}

for (int i 0; i < m; i++) {

  chart.Data.X[0,i] = <x>;

  chart.Data.Y[0,i] = <y>;

}

n and m can be diferent sizes.

Link to comment
Share on other sites

How does your DataSet looks like?

Is it something like:

Date Value SeriesId

?

If so, you can use the Cross-Tab data provider to automatomatically build your chart. We added a new setting: RowHeadingsSettings.CompressedXValues, that allows you to do this. I wrote the foolowing KB article to illustrate it:

http://support.softwarefx.com/ShowArticleSep.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/760/1/009.htm

You can also continue to use the API, you don't have to do any padding tough, all you need to do is:

for (int i 0; i < n; i++) {

  chart.Data.X[0,i] = <x>;

  chart.Data.Y[0,i] = <y>;

}

for (int i 0; i < m; i++) {

  chart.Data.X[0,i] = <x>;

  chart.Data.Y[0,i] = <y>;

}

n and m can be diferent sizes.

Don't you mean

for (int i 0; i < n; i++) {

  chart.Data.X[0,i] = <x>;

  chart.Data.Y[0,i] = <y>;

}

for (int i 0; i < m; i++) {

  chart.Data.X[1,i] = <x>;

  chart.Data.Y[1,i] = <y>;

}

 

We'll try this. We tried the cross table provider in the latest version and that seemed to work but was horrendously slow. We had 76640 points on series 1, the same on series 2 and then 30 on series 3. It took about 3 minutes to show the chart

 

So....just so I'm clear.

Do I put the timestamps on the x axis and the values on the Y with your API example?

for (int i 0; i < n; i++) {

  chart.Data.X[0,i] = <x>;  This is a datetime value

  chart.Data.Y[0,i] = <y>;

}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...