Home forums Feature Requests & Feedback Shared legend for multiple charts

This topic contains 1 reply, has 2 voices, and was last updated by  Sunil Urs 3 years, 5 months ago.

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

    aktraverso
    Participant

    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?

    #4785

    Sunil Urs
    Keymaster

    Hi,

    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.


    Sunil

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

You must be logged in to reply to this topic.