Home forums Feature Requests & Feedback Shared legend for multiple charts

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4784

    Dear Sirs,

    we are evaluating the purchase of your excellent CanvasJS.
    We have a specific requirement: we need to display in a page multiple pie charts but we would like to display only once the legend in a DIV (shared across the pie charts).

    Is it possible? How?



    It is not possible to have a shared legend across charts. But I can suggest two workarounds.

    Option 1: Assign custom color to each dataPoint and render legend in a separate div yourself

    Option2: This is kind of a hack.

    1. Create multiple charts and don’t display their legend. You need to assign custom color to each dataPoint yourself.
    2. Render an additional chart with legend enabled and hide the chart itself. Here is a demonstration of what I meant.


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.