Help with Double-Y Axis

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!!!

6 Replies

ER Eric Robishaw March 21, 2006 10:34 PM UTC

Sorry...here''s the attachment.

GanttChartSample 2Y-Axis.zip


GM Geetha M Syncfusion Team 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.


ER Eric Robishaw 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?


ER Eric Robishaw 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.

LabelsImplProb.zip


GM Geetha M Syncfusion Team 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.


GM Geetha M Syncfusion Team 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.

Loader.
Up arrow icon