
This example demonstrates the basic steps in creating a tree map.
- Create a TreeMapChart object using TreeMapChart.TreeMapChart.
- Specify the plot area of the chart using TreeMapChart.setPlotArea.
- Obtain the root node of the tree map using TreeMapChart,getRootNode and add child nodes to it using TreeMapNode.setData.
- Get the child node prototype using TreeMapChart.getLevelPrototype and use it to configure the styles of all the child nodes.
- Generate the chart using BaseChart.makeChart.
- Pass the chart to the CChartViewer for display using CChartViewer.setChart (MFC version) or QChartViewer.setChart (Qt version), or generate the chart as an image file using BaseChart.makeChart (Command Line version).
- Generate tool tips for the chart using BaseChart.getHTMLImageMap (MFC/Qt version)