Home Forums WinForms controls Xceed Chart for WinForms Barseries and Axis Labeling

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18959 |

    Hi!

    I am working with Xceed Chart in .net for a prototype.

    Therefore i have to make a graph with barseries.

    Everything is allright. The only Problem ist, that the PrimaryX shows  only the count of datapoints ( 0    1   2   3   4   5), but it should display the years ( 2008   2009   2010   2011)

     i add data like this :  bar[0].Add(sum, cyear.ToString());

     In an Chart with lineseries i got this with a line.usexvalues ….   but there is no function like this for barseries? !

     

    So, my question is how to get the labels from my barseries shown.

     

    Thanks !
     

    Imported from legacy forums. Posted by kjeperti (had 1716 views)

    User (Old forums)
    Member
    Post count: 23064

    You need to turn off auto labeling on the axis, and provide your own labels, because a BarSeries does not have X values.

    e.g.:

    chart.Axis(

    StandardAxis.PrimaryX ).DimensionScale.AutoLabels = false;

    chart.Axis(

    StandardAxis.PrimaryX ).Labels.Add( “2008” );

    chart.Axis(

    StandardAxis.PrimaryX ).Labels.Add( “2009” );

    chart.Axis(

    StandardAxis.PrimaryX ).Labels.Add( “2010” );

    chart.Axis(

    StandardAxis.PrimaryX ).Labels.Add( “2011” );

    Imported from legacy forums. Posted by André (had 1851 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.