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
1495
YAxis Maximum/Minimum values with Custom tooltip
posted

Hi all,

We use MVVM in our application and use XamDataChart to display data, We face following issues, Can anybody help me with sample application ?

  1. Y-Axis Minimum – The minimum y-axis values should be automatically selected based on values in chart and not always start at 0 for charts. Please see my Day of Month chart values are in range of 60 and 70 but our YAxis are started from 0. I was tried to solve as set Maximum, Minimum and Interval values of YAxis based on our DataSource, than our Axis lables are not showing (our XAxis are customized you can see in snapshot). With out defining these values in YAxis every thing working fine. Our Axis is CategoryXAxis.
  2. We have many lines in charts, can you show one tool tip that shows values for all lines of chart on hovered date(XAxis), and always have it displayed for the date hovered over without having to be right on top of line? I am referring Day of Year chart of snapshot.
  3. Can you customize the chart series that is hovered over briefly get thicker in both chart and legend with bold labels in legend when hovered over as well? 
  • 34830
    Offline posted

    Hello elinder,

    Thank you for your post!

    1. The Numeric Y-Axis in the XamDataChart has a MaximumValue and MinimumValue property, both of which can be bound to a property in your ViewModel. If you would like to set these, I would recommend investigating the collection you have bound to the series in that chart. If you keep track of the minimum and maximum values to be plotted, you can set these values to a property in your ViewModel, and bind them to the YAxis. Alternatively, you can leave these properties blank and the chart will determine the Y-Axis minimum and maximum values based on your data source.

    2. To achieve this, I would recommend that you use either the ItemTooltipLayer or the CategoryTooltipLayer of the XamDataChart. The ItemTooltipLayer is demonstrated in the attached sample.

    3. To achieve this, I recommend writing a style for your series. In this style, you can define a LegendItemTemplate. Then, I would recommend adding a Trigger to that same style, which targets the IsMouseOver property when it is true. When this trigger is hit, you can set the Thickness value of the series, and also set the LegendItemTemplate to have bold font.

    I have attached a sample application to demonstrate the three recommendations above.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    XamDataChartDisplayCase.zip