Hi,
I'm currently using SmartGwt Power 4.1 (v9.1p_2014-08-11).
I'm trying to define colors displayed in charts by overriding FacetChart.getDataColor(int index) so I can assign a fix color to a known facet value.
Problem is getDataColor is never called.
Here is a simple test case:
Thanks in advance for your help
Antoine Galataud
I'm currently using SmartGwt Power 4.1 (v9.1p_2014-08-11).
I'm trying to define colors displayed in charts by overriding FacetChart.getDataColor(int index) so I can assign a fix color to a known facet value.
Problem is getDataColor is never called.
Here is a simple test case:
Code:
FacetChart test = new FacetChart() { @Override public String getDataColor(int index) { return "#abcdef"; } }; test.setChartType(ChartType.PIE); test.setFacets(new Facet("test")); test.setValueProperty("value"); Record r = new Record(); r.setAttribute("value",10); r.setAttribute("test", "cat1"); test.setData(new Record[] {r}); test.setSize("300", "300"); test.draw();
Antoine Galataud
Comment