MapChart with an auto-populated legend

Type tutorial

This demo shows how we can populate a custom legend on a Map chart from its Polygon series data. Code Contrary to other chart types, Legend cannot readily use data items from a Map series. The main reason being that most map series use geodata, which is parsed asynchronously, so the data items might not […]

Sunburst chart with a legend including all nodes

Type demo

This demo shows how we can include all nodes from all levels of a Sunburst chart into its legend. Code The above code iterates through the whole hierarchy and pushes all data items from all nodes into legend’s data. Demo

Heat legend with scale

Type demo

This demo shows, how we can add a scale to a Heat Legend by pushing regular ValueAxis into it. Code Demo

Align legend width plot area

Type tutorial

This demo shows how we can use events to set legend’s dx setting, to automatically align it to the left side of the chart’s plot container.

Aligning a legend with plot container

Type tutorial

This demo shows how we can use axis’ events to monitor its width, and automatically adjust position of the legend, so it is aligned perfectly with the plot area. Code Demo

Dynamically changing legend position

Type tutorial

This short tutorial will show the steps involved in dynamically changing position of the legend. Changing position The following steps are involved when changing the position of the legend, e.g. from bottom to left: For example, the below code will move the legend from bottom, to left: Demo

Grouping legend items

Type tutorial

This short tutorial will introduce two approaches that can be used to group legend items by inserting a label between its items. Approach #1 The easiest approach is to create a legend like we would do on any chart, set its data, then insert Label elements at predefined places in legend’s children list. The downside […]