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 5 years, 11 months ago.
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.
You must be logged in to reply to this topic.