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
70
stacked column graph questions
posted

Hi,

I'm using a stacked column graph, and i'd have some questions:

1-How can I have a legend for all the stacked fragment of the column?

2-Can I have a line series too with the stacked column?

3-Is it possible to have the value of the fragment in the tooltip?

4-Can I activate the graph transition?

Parents
  • 16310
    Offline posted

    Hello Luca,

    Please find answers to your questions below:

    1. How can I have a legend for all the stacked fragment of the column?

    You just need to set the legend property for the parent series:

    series: [{
     name: "parent",
     legend: { element: "legend" },
     series: [{
     …

    1. Can I have a line series too with the stacked column?

    Yes, you can render both line and stacked series on the same chart.

    1. Is it possible to have the value of the fragment in the tooltip?

    You can read the value of the current fragment in the tooltipShowing event:

         tooltipShowing: function (evt, ui) {
          console.log(ui.item[ui.series.name]);
         },

    1. Can I activate the graph transition?

    I do not understand what you mean, please provide more details around your requirement.

    I am attaching a sample that is demonstrating the suggested solutions. Please let me know if you have further questions, I will be glad to help.

    stacked.zip

Reply Children