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. Image for the cookie policy date

X-axis interval

Is there a way of programmatically set the interval value at which labels are drawn on the X-axis? Here''s what I want to do: I must draw an area chart plotting some numeric value for each letter of a word: e.g. for "sample" I''ll add a point for "s", another for "a", "m", "p" etc. Thus the points have 1 meaningful value only, the Y value, while the X value is just the index of the character in the string (0 for "s", 1 for "a", etc.). I''d like the X-axis show each character as the label for the corresponding point: "s" for the value of "s", "a" for the value of "a", and so forth. In the attached sample I have tried to draw such a chart, but I cannot manage to have the value labels ("s", "a", "m", etc) drawn in synch with the Y values. Could you please give a hint or modify the sample to works as desired? (see comments in code). Thank you in advance! Chart1_564.zip

1 Reply

DJ Davis Jebaraj Syncfusion Team April 29, 2005 10:57 AM

Hi, Please try setting the Indexed property of the ChartControl to be true. _chart.Indexed = true; The Indexed property tells the Chart to ignore the values along the X axis and only treat them as indexed labels. Regards, Davis

Live Chat Icon For mobile
Up arrow icon