shane2004 Posted November 17, 2008 Report Share Posted November 17, 2008 Hi, I used dataset built-in merge function to merge multiple series chart, however it is running into a problem when date (primary key) is different. So the chartfx is merging them as different rows, and obivously the chart is looking very wrong, so is there any better way to merge data before generating the chart For example, data sample as this below. How would I be able to draw a smooth lin on the product A firstly then Product B on top of that? Product A Price Prouct B Price 05/09/2008 05/09/2008 1826.48 06/09/2008 2612.47 06/09/2008 11/09/2008 2612.47 11/09/2008 12/09/2008 12/09/2008 1794.11 19/09/2008 19/09/2008 1841.30 20/09/2008 2612.47 20/09/2008 26/09/2008 26/09/2008 1868.39 27/09/2008 2612.47 27/09/2008 03/10/2008 03/10/2008 1792.23 04/10/2008 2612.47 04/10/2008 10/10/2008 10/10/2008 1717.13 11/10/2008 2612.47 11/10/2008 17/10/2008 17/10/2008 1716.14 18/10/2008 2612.47 18/10/2008 24/10/2008 24/10/2008 1602.07 25/10/2008 2612.47 25/10/2008 31/10/2008 2612.47 31/10/2008 1625.00 07/11/2008 2612.47 07/11/2008 1632.70 14/11/2008 2612.47 14/11/2008 1565.74 Quote Link to comment Share on other sites More sharing options...
shane2004 Posted November 18, 2008 Author Report Share Posted November 18, 2008 Also, if I have a daily price on Product A and a weekly price on Product B. How could I merge them and display them on the same picture?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> They are OK when displaying them separately, but wouldn Quote Link to comment Share on other sites More sharing options...
TomasT Posted November 20, 2008 Report Share Posted November 20, 2008 Hi, For the first request, based on the data you provided, it seems like dates are the same for both A and B. Therefore you simply have a redundant column of data. You can simply use one of the date columns for both columns: adapter.Fill(ds, "Financial"); chart1.DataSourceSettings.Fields.Add(new FieldMap("Date",FieldUsage.Labels)); chart1.DataSourceSettings.Fields.Add(new FieldMap("SeriesA",FieldUsage.Value)); chart1.DataSourceSettings.Fields.Add(new FieldMap("SeriesB",FieldUsage.Value)); chart1.DataSource = ds.Tables[0]; Also, in order for Chart FX to ignore the gaps between points , you can use the InterpolateHidden property chart1.Data.InterpolateHidden = true; You can use this same property for your second issue. Regards, TT Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.