This question is locked. New answers and comments are not allowed.
I have a chart which plots quite a few data point, as high as 300 on 3 series which comes from an array. I have the EXACT look that I want and populate it with;
radChart1.DataSource = Glb.dataArray;
radChart1.DataBind();
This works fine except all the formatting I setup is gone. I now have 900 labels which I had turned off. The line color changes to a look which doesn't match the rest of the window. Is there a way to just change the data without the rest of the chart getting changed to formatting which I don't want?
Thanks,
Joe B
4 Answers, 1 is accepted
0
Joe Banko
Top achievements
Rank 1
answered on 27 Apr 2010, 11:14 PM
I have gotten a little farther I think. My chart has three series defined, roll, pitch, theta. No data points, just the series name. I retrieve my data and put it in an array, aArray. I point to the the chart series with;
ChartSeries roll = radChart1.Series.GetByName("roll");
ChartSeries pitch = radChart1.Series.GetByName("pitch");
ChartSeries theta = radChart1.Series.GetByName("theta");
And then populate each of the series with:
for (int x = 0; x < Glb.Units + 1; x++)
{
ax = Math.Abs(Glb.aArray[x, 0]);
ay = Math.Abs(Glb.aArray[x, 1]);
az = Math.Abs(Glb.aArray[x, 2]);
roll.AddItem(ax);
pitch.AddItem(ay);
theta.AddItem(az);
}
When I look at the chart I see the data IN each of the chart series items. But I still get the annoying "No data in series or empty data series" HOW can this be?????
Joe B
0
Hi Joe,
Let me start with your initial question. When databinding RadChart clears its existing series and creates its own ChartSeries for each numeric property/field in the underlying datasource. This might lead to the loss of styles you have observed. Still, RadChart allows you do define your ChartSeries before databinding -- set the ChartSeries.DataYColumn property -- this way RadChart will not clear the ChartSeries, but it will use them, so you will keep the appearance settings you have already configured.
As for the no data message -- this seems strange to me, as your code clearly shows that items are added to the series unless Gib.Units return -1, so that the code in the loop is not executed. Please, give the above suggestion a try and let me know if it helps.
Kind regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Let me start with your initial question. When databinding RadChart clears its existing series and creates its own ChartSeries for each numeric property/field in the underlying datasource. This might lead to the loss of styles you have observed. Still, RadChart allows you do define your ChartSeries before databinding -- set the ChartSeries.DataYColumn property -- this way RadChart will not clear the ChartSeries, but it will use them, so you will keep the appearance settings you have already configured.
As for the no data message -- this seems strange to me, as your code clearly shows that items are added to the series unless Gib.Units return -1, so that the code in the loop is not executed. Please, give the above suggestion a try and let me know if it helps.
Kind regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Brad
Top achievements
Rank 2
answered on 04 May 2010, 02:02 PM
I'm not really clear on what you mean. Could you give me a simple example of setting the DataYColumn?
Thanks,
Joe B
0
Hi Joe,
Please, find attached a small example.
Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Please, find attached a small example.
Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.