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.

PrimaryYAxis.Range property

Thread ID:

Created:

Updated:

Platform:

Replies:

49891 Sep 29,2006 02:56 AM Oct 17,2006 06:16 AM Windows Forms 5
loading
Tags: Chart
Mariana
Asked On September 29, 2006 02:56 AM

Hello,

When I set the PrimaryYAxis.Range.Max property into a specific value the columns does not start from zero at the y-axis (which I get when the chart automatically calculates the range). Which property should I use to achieve this?
Best regards,
mariana

Administrator [Syncfusion]
Replied On September 29, 2006 03:37 AM


Hi Mariana,

You need to assign RangeType of PrimaryYAxis to "Set" to get the desired range.

The following code illustrate this :

this.chartControl1.PrimaryYAxis.RangeType=ChartAxisRangeType.Set;
this.chartControl1.PrimaryYAxis.Range.Min=0;
this.chartControl1.PrimaryYAxis.Range.Max=100;
this.chartControl1.PrimaryYAxis.Range.Interval=20;

Thank you for your continued interest in Syncfusion products.

Regards,
Jaya

Mariana
Replied On September 29, 2006 05:25 AM

Hello,

Thanks for the quick answer.
In my application I have columns that have negative values and therefore I can''t set PrimaryYAxis.Range.Min=0.
Is there any other way to solve the problem?

Best regards,
Mariana

Administrator [Syncfusion]
Replied On September 29, 2006 08:22 AM


Hi Mariana,

Thanks for the update.

It is possible to set the Axis range start from zero even if the negative points are plotted in the chart. This can be achieved by removing the existing Axis labels and creating custom labels with the desired range and interval.


Please try the attached sample and let me know if this helps.

Regards,
Jaya

Range.zip

Mariana
Replied On October 16, 2006 08:02 AM

Hello,

Thanks for the support.
I removed the existing Axis labels and created custom labels with the desired range and interval in my application but still I have a problem, the gridlines is not synchronized with the label tick, see attached image.

The columns in my application can change from having values between -40000 to 40000 and all values in between (depends on the setting the user makes) and I always need to have the zero with.
Is there a easier way to set the axis interval by just using the range.max and range.min property?

I also have another question. The reason to why I need to resize the chart is that when I have the columns labels aligned vertically they somethimes don't fit in the chart. Is there any function where this resizing can be made automatically?

Best regards,
Mariana

gridlines.zip

Administrator [Syncfusion]
Replied On October 17, 2006 06:16 AM

Hi Mariana,

Thanks for using syncfusion products.

1) I am able to reproduce the issue about Axis labels synchronize.

For that you have to set ChartAxisRangeType to ‘Set’ before setting the minimum and maximum values. And the interval should be set properly.


2) I am afraid this feature has not yet been implemented in chartControl. I will create a feature request on this and will update you as soon as the feature is implemented.

Please take a look at the attached sample. Let me know if this helps.

Thanks,
Sureshbabu


Axis Range with Custom label.zip

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.

;