Is it possible to achieve this kind of column chart ? Note that the District 1 users are different from District 2 users. Also the number of users in District 1 can differ in District 2. In my example District 1 has 3 users and District 2 has 2 users. I am using NetAdvantage for .NET 2007 Vol.3. My client needs this requirement ASAP.
Try using the following code:
NumericSeries series = new NumericSeries();
series.Label = "District 1";
series.Points.Add(new NumericDataPoint(65, "User A", false));
series.Points.Add(new NumericDataPoint(85, "User B", false));
series.Points.Add(new NumericDataPoint(75, "User C", false));
this.UltraChart1.Series.Add(series);
series = new NumericSeries();
series.Label = "District 2";
series.Points.Add(new NumericDataPoint(70, "User D", false));
series.Points.Add(new NumericDataPoint(50, "User E", false));
series.Points.Add(new NumericDataPoint(0, "", true)); // add an empty data point
this.UltraChart1.Data.ZeroAligned = true;
Thanks. You have given me the right solution.
Hi,
By default for above chart,the legend box is showing row labels,like User A,User B....
But I want to show the series Lables there, like District 1,District 2.
Is there any way to show the legend lables like that.
I tried to set the Legend Format string Property to <SERIES_LABEL> (by default it is <ITEM_LABEL>).
Then I can see the series labels instead of Item Labels in the legend position.See the image below.
But In the Legendbox, I want to show the each series lables at once.Means District1 and District2.
Is there is anyway to do it.
You can use:
this.ultraChart1.ColorModel.ModelStyle = ColorModels.CustomSkin;
this.ultraChart1.ColorModel.Skin.ApplyRowWise = true;
in this case you won't need to specify custom legend string format.
Yes,it is working.Thanx for ur reply.
Now in this sample we are showing All the series 1 and series 2 Labels seperatly.
Can we show the series Items alternatively
See the below image.Is there is any way to set the unique colors for each series like this.