ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  QUILT chart
Posted by sean laks on Jun-23-2022 18:33
Hi

Can ChartDirector generate Quilt charts?

Thanks

  Re: QUILT chart
Posted by Peter Kwan on Jun-24-2022 04:11
Hi Sean,

I search google for "Quilt charts", but I cannot find any definition of what is a "Quilt charts". I do found some web page displaying sometime like a text table with colored cells and call it a "Quilt chart". If this is the case, the discrete heat map in ChartDirector can be used:

https://www.advsofteng.com/doc/cdnet.htm#heatmapcelllabels.htm

Regards
Peter Kwan

  Re: QUILT chart
Posted by Sean Laks on Jun-24-2022 18:52
Hi Peter

   My apologies for not including an example. As you rightly stated, here is an example of quilt chart in this article.

https://awealthofcommonsense.com/2021/01/updating-my-favorite-performance-chart-for-2020/

I want to use this as a performance report where
1) each column has a fixed number of categories (say  investment type)
2) each cell displays the category name & returns (i.e. each cell can have 1 or more data points)
3) each category is uniquely colored
4) A column as described above can occur multiple times thereby forming a grid

Do I still go with discreteheatmap? If so, I presume I have to somehow tie the categoryname (one of 2 data points) to the cell color

Thanks
Sean

  Re: QUILT chart
Posted by sean laks on Jun-25-2022 04:47
Hi Peter

  I was experimenting with the Heat Chart and realized that zData only accepts double (not strings). In my case the zData is actually a string. tried to type cast string to double and store but led to deeper issues.

  Any thoughts on how I can generate the chart with zData as String?

FYI - I am using the Java version

  Re: QUILT chart
Posted by Peter Kwan on Jun-25-2022 14:22
Hi Sean Laks,

To me, the "Quilt Chart" in your example looks like a text table. The colors are just used to highlight the names. It is like having a text table displaying the fruits sold in a store, and coloring the cell with red for apples, orange for oranges, yellow for bananas and so on.

I remembered in your other message, you are generating HTML to be converted to PDF. If I were you, I may just generate an HTML table for the "Quilt Chart".

If you want to use ChartDirector to generate the table, you can either use BaseChart.addTable to create a CDML table:

https://www.advsofteng.com/doc/cdjava.htm#BaseChart.addTable.htm

You can also use the DiscreteHeatMap to generate the colors and then add a scatter layer to generate the labels. For the DiscreteHeatMap, you just need to assign a number for each name (eg, 0, 1, 2, 3, 4, 5, 6), then you can create the cells with the proper colors. You can using a ScatterLayer to add symbols to the cells like in the Heat Map Cell Symbols sample code:

https://www.advsofteng.com/doc/cdnet.htm#heatmapcellsymbols.htm

For your case, you can use transparent symbols which are invisible. You can then add labels to the symbols with center alignment. The following is an example of adding labels to the symbols. (The example uses left alignment. You can change it to center alignment.)

https://www.advsofteng.com/doc/cdnet.htm#scatterlabels.htm

Best Regards
Peter Kwan

  Re: QUILT chart
Posted by sean laks on Jun-25-2022 17:26
Hi Peter,

    You are spot on. After spending some time, it occurred to me that this chart is a straight HTML table with cell background color based on cell value. Since my post yesterday, I am have already implemented this plain HTML and CSS. I am have to refine it further but I think it should work. Thx for your inputs