User (Legacy) Posted November 10, 2006 Report Share Posted November 10, 2006 Hi, We're using the financial extension in C#, .NET 2.0.VS2005. According to the docs: "Dates must be passed as XValues in the first series of the chart. These dates must be passed as Julian Dates (doubles)." However, passing the range of years 2003 to 2006 yields years 8615 to 8618 in my chart. For example, as defined in Wikipedia, I pass the Julian Date 2454049.5 to represent 10 November, 2006. What am I doing wrong? I have another problem, namely that the series passed as volume doesn't show up in the chart, as if it hadn't been passed at all. The other series display as expected. My code is very similar to the single sample on passing data in the FE docs. (As an aside, a more complete sample would be very welcome. Also, may I kindly point out to those responsible that the member "DataBinding" is incorrectly spelled as "Databinding" in the sample, not very friendly to cut'n'paste style coding... Thankful for any and all help!! For reference, here is the relevant part of my code: financial1.DataBinding.LowSeries = 0; financial1.DataBinding.OpenSeries = 1; financial1.DataBinding.CloseSeries = 2; financial1.DataBinding.HighSeries = 3; financial1.DataBinding.VolumeSeries = 4; ArrayList arrTmp1 = new ArrayList(); ArrayList arrTmp2 = new ArrayList(); ArrayList arrTmp3 = new ArrayList(); ArrayList arrTmp4 = new ArrayList(); ArrayList arrTmp5 = new ArrayList(); ArrayList arrTmp6 = new ArrayList(); foreach (BarData bar in data) { arrTmp1.Add(bar.LowPrice); arrTmp2.Add(bar.OpenPrice); arrTmp3.Add(bar.ClosePrice); arrTmp4.Add(bar.HighPrice); arrTmp5.Add(bar.Volume); arrTmp6.Add(bar.jDate); } ArrayList Series = new ArrayList(); Series.Add(arrTmp1); Series.Add(arrTmp2); Series.Add(arrTmp3); Series.Add(arrTmp4); Series.Add(arrTmp5); Series.Add(arrTmp6); ListProvider lstProvider = new ListProvider(Series); chart1.DataType[0] = SoftwareFX.ChartFX.DataType.Value; chart1.DataType[1] = SoftwareFX.ChartFX.DataType.Value; chart1.DataType[2] = SoftwareFX.ChartFX.DataType.Value; chart1.DataType[3] = SoftwareFX.ChartFX.DataType.Value; chart1.DataType[4] = SoftwareFX.ChartFX.DataType.Value; chart1.DataType[5] = SoftwareFX.ChartFX.DataType.XValue; chart1.DataSourceSettings.DataSource = lstProvider; Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 10, 2006 Author Report Share Posted November 10, 2006 Joao Gandara wrote: > According to the docs: "Dates must be passed as XValues in the first series > of the chart. These dates must be passed as Julian Dates (doubles)." > However, passing the range of years 2003 to 2006 yields years 8615 to 8618 > in my chart. For example, as defined in Wikipedia, I pass the Julian Date > 2454049.5 to represent 10 November, 2006. What am I doing wrong? The dates are not Julian Dates, but OLEDATE values. You need to get the fractional number of days since 12/30/1899. Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 10, 2006 Author Report Share Posted November 10, 2006 Thank you Jeremy! Why the docs mention Julian Date we'll never know, I suppose. The date series is fine now, but I still can't see any volume series in my chart. Any ideas why? Again, thankful for help, Joao Gandara Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.