Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
325
Issue with TreeMapChart
posted

Hi,

I'm using TreeMapChart chart type and it's behaving rather oddly. I bound the chart to a datatable and exclude columns that I don't want to display.

Here's the result that i get:

Here's the ouput when the table has 2 columns only:

Does anyone know if this behaviour is by design? I couldn't figure out why there's an extra circle with the first image. I guess the TreeMapChart doesn't refresh the data when the column has been excluded. I tried with bar chart and the it works fine.

 I have sample code attached. I'm using V2009.2

Many thanks.

 

TreeMap.zip
Parents
  • 28496
    Suggested Answer
    Offline posted

    while it makes sense to try to exclude columns from the treemap in this way, column filtering works only on numeric columns, and treemap has its own way of filtering out data.

    please use this code in your "ChartAllColumn" method:

            Me.uChart.TreeMapChart.SizeValueIndex = 3
            Me.uChart.TreeMapChart.IndexOrder = New Integer() {0}

    this will ensure that the treemap gets its size values from the column at index 3, and it will get its label values from only column 0.

    the problem you experienced was with the IndexOrder; it defaulted to use every string column, for a total of 2 columns, which resulted in an extra level in the data hierarchy.

Reply Children