User (Legacy) Posted July 3, 2003 Report Posted July 3, 2003 I am trying to create a multi-series line chart where values may not be available for all series for a given x-axis point. If I use Chart.Hidded for a particular series value to hide it, the line for this series gets "interrupted". See http://www.liquidhome.com/~lvi/chartfx/bad.jpg for an example. I can use some simple math to interpolate the missing values and produce the result I need http://www.liquidhome.com/~lvi/chartfx/good.jpg , but the code is rather complicated and hard to maintain. I am just wondering, may be there is some option in ChartFX which would allow me to achieve the same result without interpolating the missing values manually? Ilya
Software FX Posted July 3, 2003 Report Posted July 3, 2003 Set your gallery type to Lines (it is probably a scatter chart now). -- Regards, JC Software FX Support "Ilya Languev" <junk@liquidhome.com> wrote in message news:A01uCMaQDHA.1300@WEBSERVER1.... > I am trying to create a multi-series line chart where values may not be > available for all series for a given x-axis point. If I use Chart.Hidded for > a particular series value to hide it, the line for this series gets > "interrupted". See http://www.liquidhome.com/~lvi/chartfx/bad.jpg for an > example. > > I can use some simple math to interpolate the missing values and produce > the result I need http://www.liquidhome.com/~lvi/chartfx/good.jpg , but the > code is rather complicated and hard to maintain. > > I am just wondering, may be there is some option in ChartFX which would > allow me to achieve the same result without interpolating the missing values > manually? > > Ilya > >
User (Legacy) Posted July 3, 2003 Author Report Posted July 3, 2003 "SoftwareFX Support" <support@softwarefx.com> wrote in message news:yLuJz4bQDHA.1220@WEBSERVER1.... > Set your gallery type to Lines (it is probably a scatter chart now). No, it is set to Lines. This example is better: http://www.liquidhome.com/~lvi/chartfx/bad1.jpg Notice how Series #2 line is broken in the middle because of the missing value for LOT_11 set to Chart.Hidden. The question is whether I can make ChartFX to connect the green line from LOT_10 to LOT_12 without providing the value for LOT_11. In other words, I need this: http://www.liquidhome.com/~lvi/chartfx/good1.jpg Ilya > > -- > Regards, > > JC > Software FX Support > "Ilya Languev" <junk@liquidhome.com> wrote in message > news:A01uCMaQDHA.1300@WEBSERVER1.... > > I am trying to create a multi-series line chart where values may not > be > > available for all series for a given x-axis point. If I use Chart.Hidded > for > > a particular series value to hide it, the line for this series gets > > "interrupted". See http://www.liquidhome.com/~lvi/chartfx/bad.jpg for an > > example. > > > > I can use some simple math to interpolate the missing values and > produce > > the result I need http://www.liquidhome.com/~lvi/chartfx/good.jpg , but > the > > code is rather complicated and hard to maintain. > > > > I am just wondering, may be there is some option in ChartFX which > would > > allow me to achieve the same result without interpolating the missing > values > > manually? > > > > Ilya > > > > > >
Software FX Posted July 4, 2003 Report Posted July 4, 2003 The line will break at hidden points. This is precisely what hidden points are used for. If you want the line to be continuous, don't insert hidden points in the middle, instead assign the X-Value appropriately. For example, if you have data for X = 1, 3, 5, 7, 19 you assign the X-values to 1, 3, 5, 7 and 19. So you end up with a chart that has only 5 points, instead of 19 points and "holes" in between the points. You can then use Hidden values only at the end of series that are shorter than others. -- FP Software FX, Inc. Attachments.zip
User (Legacy) Posted July 7, 2003 Author Report Posted July 7, 2003 "Software FX Support" <support@softwarefx.com> wrote in message news:EK8CDkkQDHA.1220@WEBSERVER1.... > The line will break at hidden points. This is precisely what hidden points > are used for. > > If you want the line to be continuous, don't insert hidden points in the > middle, instead assign the X-Value appropriately. > > For example, if you have data for X = 1, 3, 5, 7, 19 you assign the X-values > to 1, 3, 5, 7 and 19. So you end up with a chart that has only 5 points, > instead of 19 points and "holes" in between the points. > > You can then use Hidden values only at the end of series that are shorter > than others. I do not quite get what you mean by "X-Value". I assume it is NOT the SoftwareFX.ChartFX.Chart.XValue collection since it is used for scatter X/Y plots and I need a line chart. If I initialize my chart this way: chart1.OpenData(SoftwareFX.ChartFX.COD.Values, 2, 20); for( int nValue = 0; nValue < 20; nValue++ ) { int nSeries = nValue % 2; chart1.Value[nSeries,nValue] = (nSeries == 0 ) ? 50 : 100; } chart1.CloseData(SoftwareFX.ChartFX.COD.Values); ... then I'm getting some garbage Y-values for even X-values on the first (blue) series and for odd X-values on the second (green) series: http://www.liquidhome.com/~lvi/chartfx/garbage.jpg If I use ClearData to wipe the values before calling OpenData: chart1.ClearData(SoftwareFX.ChartFX.ClearDataFlag.Values); ... then I am getting zeroes instead of the garbage http://www.liquidhome.com/~lvi/chartfx/zeroes.jpg. But no matter what I do, I do not get the right result http://www.liquidhome.com/~lvi/chartfx/good2.jpg without "faking" the missing values. But
Software FX Posted July 8, 2003 Report Posted July 8, 2003 I do mean the X-Value collection. X-Values can be used for many types of charts including Line, Scatter, Area, and more. -- FP Software FX, Inc.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.