I have a chart it looks like this
http://imgur.com/XoeCnvO
http://imgur.com/XoeCnvO
I want to change Y axis numbering and label it 1% 10% 33.% etc as shown below without changing the plot.
How do I change it
Required output graph:
http://imgur.com/fJ6bQzk
Try something like this:
CustomLabel label1 = new CustomLabel
{
FromPosition = -3.5,
ToPosition = -2.5,
Text = "1%"
};
CustomLabel label2 = new CustomLabel
{
FromPosition = -2.5,
ToPosition = -1.5,
Text = "10%"
};
CustomLabel label3 = new CustomLabel
{
FromPosition = -1.5,
ToPosition = -0.5,
Text = "33.3%"
};
CustomLabel label4 = new CustomLabel
{
FromPosition = -0.5,
ToPosition = 0.5,
Text = "50%"
};
CustomLabel label5 = new CustomLabel
{
FromPosition = 0.5,
ToPosition = 1.5,
Text = "66.7%"
};
CustomLabel label6 = new CustomLabel
{
FromPosition = 1.5,
ToPosition = 2.5,
Text = "90%"
};
CustomLabel label7 = new CustomLabel
{
FromPosition = 2.5,
ToPosition = 3.5,
Text = "99%"
};
chart1.ChartAreas[0].AxisY.CustomLabels.Add(label1);
chart1.ChartAreas[0].AxisY.CustomLabels.Add(label2);
chart1.ChartAreas[0].AxisY.CustomLabels.Add(label3);
chart1.ChartAreas[0].AxisY.CustomLabels.Add(label4);
chart1.ChartAreas[0].AxisY.CustomLabels.Add(label5);
chart1.ChartAreas[0].AxisY.CustomLabels.Add(label6);
chart1.ChartAreas[0].AxisY.CustomLabels.Add(label7);