Is there any way to change the position of ValueLabel in .Net Chart?

3.6k views Asked by At

I want to change position of ValueLabel of my chart. What is the solution?

Also can I change size of that?

3

There are 3 answers

0
sobby01 On

You can set the position by this way :

<Points>               
      <asp:DataPoint AxisLabel="1" YValues="14" />
      <asp:DataPoint AxisLabel="2" YValues="11" />
      <asp:DataPoint AxisLabel="3" YValues="16" />
      <asp:DataPoint AxisLabel="4" YValues="4" />
      <asp:DataPoint AxisLabel="5" YValues="3" /> 
</Points>
3
V4Vendetta On

Did you try setting the LabelStyle which is a Custom property. here you can specify the positioning within the predefined ones like

  • Top, Bottom, Right, Left, TopLeft, TopRight, BottomLeft, BottomRight, Center
0
steven On

I think I am too late, but as I had the same problem and found a solution, here it is:

yourChart.Series["yourSeries"]["LabelStyle"] = "Right";

This changes the position of the value label, NOT the axis label!