Home Forums WinForms controls Xceed Chart for WinForms Dimension labels and size of X-axis

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

    I’m using an X axis with custom labels, which works fine. The line serie added also works as expected, the only problem is that the X axis becomes twice the size needed by the graph. My question is how do I ensure that the axis does not become twice the size needed to display the lineserie?

    Edit: After some more research I found out that, the problem that I’m creating the “step” graph, which means I add twice as many points to the graph, but without making the lineserie larger on the X axis. Therefore I would still like to set a maximum size on the X axis.

    Imported from legacy forums. Posted by Xharze (had 1489 views)

    User (Old forums)
    Member
    Post count: 23064

    I’m not sure I totally understand what you’re doing, but I would suggest you use a NumericScale instead of a DimensionScale.  You will need to set UseXValues to true on the line series, then make sure you add all your DataPoints with an XValues, so they will appear at the right position.  This way the X axis should not double.

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

    User (Old forums)
    Member
    Post count: 23064

    The problem is that I have to use text instead for numbers on the X axis.

    By a step function I mean a graph like the one described here: http://www.originlab.com/index.aspx?s=8&lm=208&pid=874. To do this in Xceed I have to create twice as many datapoints than the standard.

    Imported from legacy forums. Posted by Xharze (had 420 views)

    User (Old forums)
    Member
    Post count: 23064

    You can still use text on the X axis.  Turn off auto labeling, and provide your own labels, as strings.

    chart.Axis(

    StandardAxis.PrimaryX ).ScaleMode = AxisScaleMode.Numeric;

    chart.Axis(

    StandardAxis.PrimaryX ).NumericScale.AutoLabels = false;

    chart.Axis(

    StandardAxis.PrimaryX ).Labels.Add( “Some Text” );

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

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