User (Legacy) Posted April 11, 2003 Report Share Posted April 11, 2003 In ChartFX IE 2000, I am trying to create a line graph of multiple series of data points overtime that is scaled based on the date. For example: series 1: 5 on 1/1/1990; 7 on 2/2/1992; 9 on 4/4/2003 series 2: 14 on 2/2/1987; 15 on 2/5/2002 My understanding is that I need to use an XY plot in order to make the lines continuous when a point doesn't exist for the series. However when loading data into Series.XValue(j) I need to provide a double but instead I have date and I need the date ranges to appear scaled on the X axis of the graph. Is there a standard way for doing this using ChartFX? Link to comment Share on other sites More sharing options...
User (Legacy) Posted April 11, 2003 Author Report Share Posted April 11, 2003 If you following the standard XY graph instructions and just allow the Date to be implicitly cast to a double and the system works properly. Don't forget to change the axis format of date (oChart.Axis(AXIS_X).Format = AF_DATE) -------- from the help files: Passing Data to a scatter plot with the ValueEx and XValueEx properties. The only special case when passing data to an XY Plot is that you're going to make two OpenDataEX method calls (one with COD_VALUES or y coordinate and another one with COD_XVALUES or x coordinate) and finally use the "ValueEx" property to assign the appropriate y values and the "XValueEx" property to assign the x values of each point in the chart. The source code should look as follows: ' Open the VALUES channel specifying "nSeries" Series and "nPoints" Points ChartFX1.OpenDataEx COD_VALUES,nSeries,nPoints ChartFX1.OpenDataEx COD_XVALUES,nSeries,nPoints ' Code to set the data For i = 0 To nSeries-1 For j = 0 To nPoints -1 ChartFX1.ValueEX(i,j) = 'Y Coordinate Value ChartFX1.XValueEX(i,j) = 'X Coordinate value Next j Next i ' Close the VALUES and XVALUES channels ChartFX1.CloseData COD_VALUES ChartFX1.CloseData COD_XVALUES Passing Data to a scatter plot with the Series Object. You can also use the YValue and XValue properties in the Series object to pass data to an XY Plot. ' Open the VALUES channel specifying "nSeries" Series and "nPoints" Points ChartFX1.OpenDataEx COD_VALUES,nSeries,nPoints ChartFX1.OpenDataEx COD_XVALUES,nSeries,nPoints ' Code to set the data For i = 0 To nSeries-1 For j = 0 To nPoints -1 ChartFX1.Series(i).YValue(j) = 'Y Coordinate Value ChartFX1.Series(i).XValue(j) = 'X Coordinate value Next j Next i ' Close the VALUES and XVALUES channels ChartFX1.CloseData COD_VALUES ChartFX1.CloseData COD_XVALUES "Dave Sanders" <nobody@nobody.com> wrote in message news:FrBYHhEADHA.2704@webserver1.softwarefx.com... > In ChartFX IE 2000, I am trying to create a line graph of multiple series of > data points overtime that is scaled based on the date. > > For example: > series 1: 5 on 1/1/1990; 7 on 2/2/1992; 9 on 4/4/2003 > series 2: 14 on 2/2/1987; 15 on 2/5/2002 > > My understanding is that I need to use an XY plot in order to make the lines > continuous when a point doesn't exist for the series. However when loading > data into Series.XValue(j) I need to provide a double but instead I have > date and I need the date ranges to appear scaled on the X axis of the graph. > > Is there a standard way for doing this using ChartFX? > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.