eromurugan Posted May 24, 2010 Report Posted May 24, 2010 Hi, I need to display the chart on click of a button in a web page. On click of a button, I hit the DB to get data and bind them to the chart controls in the web page. On second click of the button, the data is bound to the chart control for second time. this makes bar chart with two colors for each of the data bound to it. I need to clear the datasource set to chart and reassign new datasource. How can this me achieved? Help me with some suggestions. Quote
CarlosAC Posted May 27, 2010 Report Posted May 27, 2010 Hi eromurugan If you want to clear the datasource, you can use the following code: Chart1.Data.Clear(); Also, if you previously add some FieldMaps, you should clear that Collection too and, if you want, add some new FieldMaps. In order to clear the FieldMaps Collection, please use the following code: chart1.DataSourceSettings.Fields.Clear(); Carlos Chaves Quote
eromurugan Posted May 27, 2010 Author Report Posted May 27, 2010 Hi CarlosAC, Thanks for the reply. I tried to clear the datasource using Chart1.Data.Clear() method and them bind the new data but still during the second bind, it assume both the datasource set and display the comparison like chart with bars for two datasource. Thanks in advance. Quote
CarlosAC Posted May 28, 2010 Report Posted May 28, 2010 Hi eromurugan In order to help you I need to see exactly what is the behavior with the first binding, and then compare it with the second binding. Please contact Software FX Support at support[at]softwarefx[dot]com with a small repro case of this issue. Also, attach a couple of images describing the facts you are seeing. Please remember to include the serial number of your product as well. Carlos Chaves Quote
eromurugan Posted June 4, 2010 Author Report Posted June 4, 2010 Thanks, Carlos I will mail the picture to the support and get their help too in finding a solution to this issue. Quote
eromurugan Posted June 25, 2010 Author Report Posted June 25, 2010 Hi, I got a solution and fixed the issue. I included the following statements to clear the datasource for the chart before assigning new chart datasource. ChartFx1.Data.Clear(); ChartFx1.DataSourceSettings.Fields.Clear(); Thanks a lot all suggestion. Quote
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.