Category / Section
How to align the TreeMap legends?
1 min read
To enable the alignment of the TreeMap legends, follow the given steps.
Step1: Create a TreeMap sample, and include the necessary script files.
Step 2: By enabling the alignment of the TreeMap legend, you can change the alignment according to your requirement. It can be near, far, or center for each of the top, bottom, left, or right position.
legendSettings: { dockPosition: "bottom", alignment:"center" },
$("#treemap").ejTreeMap({ dataSource: population_data, colorValuePath: "Growth", showLegend:true, legendSettings: { dockPosition: "bottom", alignment:"center" }, });
The following screenshot shows the alignment of the TreeMap legend.
Figure 1: Legend center aligned
Sample Link:
http://www.syncfusion.com/downloads/support/directtrac/general/ze/treemap-223387446.zip