Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
815
Automatically extend chart when it is 95% full
posted

Can the XamDataChart be set so that it adds free space to the right of the data curve when it is 95% full?   We want this to be more or less 95% but it does not need to be exactly 95%.

Version 11.2 does this when it is 100% full.

Our scenario:
   - XamDataChart v11.2
   - Multiple data curves each bound to a numericYaxis and a numericXaxis.  The numericXaxis is the number of seconds since the start of the data.
  -  New data points being added at about 1 new point per second for each curve.  Points are added at random times for each curve and added on different threads
  - Our users want about 5 to 10 percent of the graph to be free at the right hand side.
            - We load the initial data set into the graph and want the free space to be about 10% of the graph data curve area
           - New data points are added to the graph and consuming the free space on the right hand side
          - When 95% of the graph is filled by the curves, we want to add another 5% of free space to the right of the graph

The current v11.2 xamDataChart will only add extra empty space at the right of the chart when the data curve fills 100% of the width of the graph data curve area.

 

  • 34510
    Offline posted

    Hi c1427,

    While there is no setting that will do this automatically for you, you can achieve this effect by increasing the NumericXAxis.MaximumValue property to a value greater than the last data curve that was added.  In the code where you add a new data curve, you would check to see if this value is greater than the MaximumValue minus some arbitrary number.  This arbitrary number would represent your 5% of free space.  If your data curve is greater than this then you need to increase MaximumValue to compensate.