Customize Legends
In multi-series charts, you have interactive legends assigned to each set of data. This helps you to relate each and every dataset to its corresponding category. Legends in FusionCharts are interactive in nature. You can click on the legend icon representing a particular data series to either hide or show it the data plot and focus on specific data sets on the fly.
For quick reference, refer to the following list to explore how can you customize your legends:
- Show/Hide Legends
- Interactive Legend
- Hidden Data Series
- Gradient Legend
- Legend Position
- Custom Icons in Legend
- Legend with Scrolling
Show/Hide Legends
Show legends on the chart to identify the data plots corresponding to a particular series. You can also choose to hide the legend icons on the chart if you are sure that the users will be able to understand the data without the legend.
To know more about this feature, click here.
Interactive Legend
By default, legends are interactive in nature. This means you can use the legends to show/hide, fade in/fade out, or slice in/slice out (for pie and doughnut charts only) the data plots. If necessary, you can also disable the interactivity of a legend.
Let us suppose that while comparing the quarterly revenue of two years, you want to focus on the current year. Simply hover the mouse on the legend of the current year to fade out the revenues for the last year.
To know more about this feature, click here.
Hidden Data Series
Let’s assume that you have 2 data series in one chart. For better understanding, in the first view of the chart, you want to show only one data series. At a later stage, you might want to view the second data series to compare both.
FusionCharts allows you to render the chart with the second data series hidden and with an inactive legend.
Later on, when required, click on the respective legend to view the data series.
To know more about this feature, click here.
Gradient Legend
So far, we have discussed Icon legends. Maps and a few specific charts like Heat Map chart support gradient legends. The gradient legend will show the color variation from the lower limit to the higher limit, either using sequential color or a diverging color palette.
For example - If you are trying to show the distribution of marks, the gradient legend will appear based on the marks value and the color range in which it resides.
To know more about this feature, click here.
Legend Position
In FusionCharts, you can change the position of the legend to improve the appearance of the chart. There are two modes of configuration, absolute and relative placement. You can give an absolute position (X and Y coordinates) to your legend. There are a total of 12 different relative positions of the legend you can choose from (bottom, right, top, left, top left, top right, bottom left, bottom right, left top, left bottom, right top, right bottom).
Let us have a look at a multi-series column chart with all the possible legend configurations in it.