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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Help with Double-Y Axis

Thread ID:





42167 Mar 21,2006 10:26 PM UTC Mar 23,2006 11:49 AM UTC WinForms 6
Tags: Chart
Eric Robishaw
Asked On March 21, 2006 10:26 PM UTC

Please see the attached project. I have a multiple series gantt chart, plotting along the Y axis. Every Y label needs to be plotted for this graph, becuase they represent entities. However, when you get too many Y labels, you can''t see what''s going on... SO: I want to have 2 things happen when I get too many labels: 1) Spread them out by zooming in on the graph. 2) Placing 2 Y-Axes. One on the left, one on the right. The one on the left displays every other label, and the one on the right does the alternate labels. I cannot get this to work with the zoom factor, at all. I''m probably going about this the completely wrong way, but I''ve tried: 1) IChartAxisLabelModel 2) Adding labels to the labels collection 3) using the label format event. NONE of them work right. HELP!!!

Eric Robishaw
Replied On March 21, 2006 10:34 PM UTC

Sorry...here''s the attachment.

GanttChartSample 2Y-Axis.zip

Geetha M [Syncfusion]
Replied On March 22, 2006 10:27 AM UTC

Hi Eric, Thanks for the sample. 1. Please find attached the sample which uses IChartAxisLabelModel to display the labels in Y axis. While doing so please be sure that the Indexed property of the Chart is set to true. 2. You can have the secondary axis at the desired position by creating a new instance of the Chart Axis class. Kindly have a look at the ChartMultipleAxes sample under [Installed Drive]:\Program Files\Syncfusion\Essential Studio\version number\Windows\Chart.Windows\Samples\ChartAxes\ChartMultipleAxesSample to have a better idea about this feature. F42167.zip Please let me know if this helps you. Regards, Geetha.

Eric Robishaw
Replied On March 22, 2006 02:48 PM UTC

Your example code fails. Object Reference not set to an instance... at Series.Add(); This occurs whenever the graph is set to Indexed = true; Does this value need to be set AFTER adding the series? If so, does that mean I have to always set it to false first, add the series data, then set it to true? WHen I do it SORT OF WORKS. OTHER ISSUE NOT ADDRESSED: After moving the Indexed=true to the end of the InitializeData() method and getting the graph to display: ZOOM IN , and watch the Y-Axis Labels. They are no longer positioned correctly. This is part of the key problem. Any ideas?

Eric Robishaw
Replied On March 22, 2006 03:27 PM UTC

Here''s the BIG problem: Chart.Indexed needs to be moved to the Axis: Chart.PrimaryXAxis.Indexed Look at the attached example (Modified version of your example). When you enable Indexed mode, the graph stops working correctly!!!! You only get one Series per Y Point. THIS IS A REAL PROBLEM. I need Y-Indexed Labels but nothing seems to work correctly.


Geetha M [Syncfusion]
Replied On March 23, 2006 04:20 AM UTC

Hi Eric, Thanks for bringing these issues to our attention and I am able to reproduce them. I have logged bug report on this regard and will update you as soon as the fix is available. Please have a look at the attached sample which displays customized labels in Y axis. CustomLabels.zip Kindly let us know if this helps you. Regards, Geetha.

Geetha M [Syncfusion]
Replied On March 23, 2006 11:49 AM UTC

Hi Eric, We regret for the inconvenience caused. I believe the sample in my previous update was broken. Please try running the sample attached here and let me know if this helps you. Labels.zip Regards, Geetha.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon