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
140
UltraChart StackedColumnChart tooltip questions
posted

This is the first time I have ever worked with a chart of any kind and I am struggling a bit to find a way to do the simple things I want to do.  I know there must be a property somewhere, but I have not found it.  I am using a stacked column chart.  The first issue that I am trying to resolve is when there are multiple  data values stacked, when I hover over each area, the tooltip displays a cumulative number (a sum) as you move up the stack instead of displaying the actual data value for that area.  For example, if I have a stack made up of 3 areas, the first value is 5, the second value is 10 and the third value is 5, when I hover over the bottom area, the tooltip is 5, but when I hover over the second area, the tooltip is 15.  I expect this to be 10.  When I hover over the third area, the tooltip is 20.  I expect this value to be 5.  What do I need to do to get this expected behavior?  Also, I need to add some additional text to the tooltip and see that I should be able to use the FillSceneGraph method to accomplish this, but I’m having difficulty finding the primitives for the boxes that make up my stack.  Is there a good tutorial somewhere that will enable me to familiarize myself with the stacked column chart and how to work with it?  I have been through the forum and I’m still going through it, but thought I would go ahead and get my questions out there to see if I could get some help.  Thanks, Sabrina

Parents
  • 6158
    Verified Answer
    Offline posted

    Hello Sabrina.

    By default, the StackedColumn chart will display the aggregate values for the column. To modify the tooltip to display the value of each individual item, you can change the chart's Tootips.FormatString to "<DATA_VALUE_ITEM>".

    this.ultraChart1.Tooltips.FormatString = "<DATA_VALUE_ITEM>";

    If you want to add custom text to the tooltip, you'll need to utilitize the IRenderLabel interface. The basis to this mechanism is you implement an ToString() method for this interface, and associate the interface implementation with a string token. When the chart encounters this token in the FormatString properties, it will call the ToString() method. I've attached simple sample that demonstrates using the interface.

    If you haven't already found it, here is a link to our online help for the UltraChart.

    Let me know if you have any further questions.

    Chris

    WindowsFormsApplication1.zip
Reply Children