Hello,
Is there any way to set maximum visible value for the NumericYAxis? If I set MaximumValue to 100, the maximum tick mark value may be less than 100. I think this can be done via TickmarkValues parameter, but I could not manage how to properly initialize this property. Can you please provide me with an example?
Thank you,
Gary
Hi Rob,
Thank you very much for the useful replay.
Regards,
Hi Gary,
I've come up with a possible solution that you can use so that the label at the very top will always read 100 even when zoomed in. Please find attached to this post a sample that demonstrates this.
I created custom tickmark values that always updated to contain the last visible Y Axis value. This would let me keep a label at the very top of the chart no matter what my zoom level was. In order to keep this label displaying 100, I needed to apply a converter to the labels and once I determined which label was the topmost I formatted it to say 100.
Let me know if you have any questions on this matter.
I think I understand what you mean now. Let's say you were to zoom into the chart, normally the tick marks would zoom as well and this would cause the 100 to move out of view. You want to keep the 100 there at the top at all times. This looks like something where you'd need to create a custom set of tick mark values. Check out the followig link to our help documentation. It shows you how to create custom tick mark values.http://help.infragistics.com/NetAdvantage/WPF/2012.1/CLR4.0/?page=xamDataChart_Creating_Custom_Axis_Tickmark_Values.html
I'm working on putting together a sample for you but this won't be ready till early next week.
Thanks for your reply. I want to display percentage values on a bar chart. The maximum value should be 100% in all cases. So, I want the mark tick of 100 is always displayed on the chart.
Do you have any ideas how to achieve this?
Thanks,
I'm not exactly sure of what you are asking. If you set the MaximumValue to 100 for the Y axis, the labels shown along this axis will reach up till 100 and stop regardless of what the actual data is in the series. Is this not what you want? Another option would be to not set these values and let the chart automatically decide what they are based on the data in the chart series. So if your highest data point is 100, the chart will automatically make 100 the highest point on the NumericYAxis.