We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Information in a stackingcolumn graphic

Thread ID:

Created:

Updated:

Platform:

Replies:

100394 Aug 3,2011 02:11 PM Aug 11,2011 12:02 AM ASP.NET Web Forms (Classic) 8
loading
Tags: Chart
victor elizondo
Asked On August 3, 2011 02:11 PM

Hello

I'm having a little problem with the information in a Stackingcolumn Graphic. As you can see in the pic that I've attached, the numbers are overlapping in the color sections (in the little sections indeed, the green section for example).

The line that I'm using to showing that infotmation is this one ( I'm using Visual Studio 2008 C#):

series1.Style.DisplayText = true;

where series1 is a Syncfusion.Windows.Forms.Chart.ChartSeries.

Could Syncfusion provides me a solution for showing values in a tiny sections without the overlapping using StackingColumn?

Other problem is if the corresponding datatable to the graphic sends me a zero, this one appears in the graphic and i don't wanna that.

Best Regards.



graphic_788beffb.zip

Vijayabharathi K [Syncfusion]
Replied On August 4, 2011 05:07 AM

Hi Victor,

Thanks for using Syncfusion products.

1) Could Syncfusion provides me a solution for showing values in a tiny sections without the overlapping using StackingColumn?

We suggest you to use different text orientation values for chart series to avoid the overlapped issue in tiny section of the chart series. Please refer the below code snippet to achieve this,

[C#]

this.ChartWebControl1.Series[0].Style.TextOrientation = ChartTextOrientation.RegionCenter;
this.ChartWebControl1.Series[1].Style.TextOrientation = ChartTextOrientation.Right;
this.ChartWebControl1.Series[2].Style.TextOrientation = ChartTextOrientation.Center;
this.ChartWebControl1.Series[3].Style.TextOrientation = ChartTextOrientation.Left;
this.ChartWebControl1.Series[4].Style.TextOrientation = ChartTextOrientation.Center;


2) is if the corresponding datatable to the graphic sends me a zero, this one appears in the graphic and i don't want that.

If your intension is to remove the zero value point from chart series, you can use “RemoveAt()” method to remove the zero value points. Please refer the below code snippet to achieve this,

[C#]

for (int i = 0; i < this.ChartWebControl1.Series.Count; i++)
{
for (int j = this.ChartWebControl1.Series[i].Points.Count-1; j > 0; j--)
{
double d = this. ChartWebControl1.Series[i].Points[j].YValues[0];
if (this. ChartWebControl1.Series[i].Points[j].YValues[0] == 0)
{
this. ChartWebControl1.Series[i].Points.RemoveAt(j);
}
}
}
Note: Refer the attached screenshot for these queries.

Please let us know if you have any concern.

Regards,
Vijayabharathi




SShot_9ae8b8f9.zip

victor elizondo
Replied On August 4, 2011 04:58 PM

Hello Vijayabharathi K

Thanks a lot for your help, it was very useful, but I need your help one more time.

In the theme:

2) is if the corresponding datatable to the graphic sends me a zero, this one appears in the graphic and i don't want that.

I'm having an error (I've attached a pic about it).

As you can see, the graphic has 12 columns (j= 0 TO j= 11). I'm using your code snippet and in the loop when j = 11 the method RemoveAt(11) works perfectly, but in the next loop RemoveAt(10) throws me the error in the picture. I've noticed this works in the loop once, but in the next one fails, in all value combinations fails (when the j value turns 11 to 10 or 10 to 11 or 1 to 2 or 2 to 1).

Hope you can help me again.

Best Regards.



zero_e9619159.zip

Vijayabharathi K [Syncfusion]
Replied On August 5, 2011 04:47 AM

Hi Victor,

Thanks for the update.

We are unable to reproduce this reported exception in sample level. Please refer the attached sample for this issue.

Please have a look at the sample and if the issue still exists, could you try reproducing it in the above sample and send us the modified sample , so that we could sort out the cause of the issue and provide you a solution.

Regards,
Vijayabharathi




Sample_f4f4c4f2.zip

victor elizondo
Replied On August 6, 2011 02:41 PM

Hi Vijayabharathi

It's very weird. I'm using your sample, the same code and I'm getting the same error. I don't have the sample in this moment, but I will send it the monday ( monday in Mexico).

Best Regards.


victor elizondo
Replied On August 8, 2011 03:23 PM

Hi Vijayabharathi

I'm sending you my code sample with your code that you provided me earlier. I'm having the same error.

Best Regards.



zerochart_37c28569.zip

Vijayabharathi K [Syncfusion]
Replied On August 9, 2011 01:08 AM

Hi Victor,

Thanks for sharing the sample with us.

We are able to reproduce the issue in Essential studio 6.4 version. So, we suggest you to use “IsEmpty” property of chart points to hide the zero value point from chart series in 6.4 version. Please refer the below code snippet to achieve this,

[C#]

for (int i = 0; i < this.ChartWebControl1.Series.Count; i++)
{
for (int j = 0; j < this.ChartWebControl1.Series[i].Points.Count; j++)
{
if (this.ChartWebControl1.Series[i].Points[j].YValues[0] == 0)
{
this.ChartWebControl1.Series[i].Points[j].IsEmpty = true;
}
}
}

Also, we suggest you to upgrade the Essential studio to the latest version (9.3.0.61) to effectively use our Syncfusion products.

Please let us know if you have any concern

Regards,
Vijayabharathi






victor elizondo
Replied On August 9, 2011 10:44 AM

Hi Vijayabharathi

Thanks a lot. Now this problem is gone and I will try to get the latest version of syncfusion.

Best Regards.


Vijayabharathi K [Syncfusion]
Replied On August 11, 2011 12:02 AM

Hi Victor,

Thanks for the update.

please let us know if you need further assistance

Regards,
Vijayabharathi




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;