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
105
How to show Axes labels for specific intervals
posted

Hi there,

We need to have a chart showing x -Axis with an interval of 10 seconds and after 6 such intervals the line is to be bolded, deneoting the minute.

Also, the label should appear only for the minute line on x- axis, that is - 2 labels are 6 blocks apart. (picture attached)

which properties of the xamDAtaChart can we use for this?

Also, how to specifiy the interval value for the Strip. (need to highlight an area beween specific values for Y - Axis).

 

Parents Reply
  • 1400
    Offline posted in reply to nitin
    Hi Nitingaur,
    I attached zip file with corrections to your sample application and  here are some issues that I fixed.
    First, I noticed that data mapping for Label property of both CategoryXAxis objects were missing in your sample application. Also, there was a small mistake in code behind of TickerBuffer class for updating time of randomly generated data rows which resulted in the same date time value for all data points. Another thing that I observe was that the historical data that the chart was displaying was missing time component in Column0 of data rows. And as result the xamDataChart was displaying 12:00:00 (the default initialization value for time of DateTime object)  for all data points on CategoryXAxis:
    You can fix this by either:

    -adding time component to your historical data (see comments in the HistoricalData property of DataLoader class) or by

    -updating the time component of Column0 when a new data row is added using values from historical data (see commented out code in the AddRecordsFromHistoricalData method of TickerBuffer class).

    Either of proposed fixes above will generate the following chart and you will only need to set the Visibility property of the second CategoryXAxis object to Collapsed to hide labels on bottom axis in order to generate the chart that you requested in your original question.

     

     
    Please let me know if you have more questions about using the XamDataChart control.

    -      Martin

     

Children
No Data