We switched theme from enterprise to stratos and the chart legend is now left aligned:
So we tried to use setCenterLegend to no avail.
Here's the code to replicate the issue:
So we tried to use setCenterLegend to no avail.
Here's the code to replicate the issue:
Code:
public class AppEntryPoint implements EntryPoint { @Override public void onModuleLoad() { final FacetChart chart = new FacetChart(); chart.setData(records()); chart.setFacets(new Facet("region", "Region"), new Facet("product", "Product")); chart.setValueProperty("sales"); chart.setChartType(ChartType.AREA); chart.setTitle("Sales by Product and Region"); chart.setCenterLegend(true); VLayout layout = new VLayout(); layout.setWidth100(); layout.setHeight100(); layout.addMember(chart); layout.draw(); } private final Record simpleChartData(String region, String product, Integer sales) { Record record = new Record(); record.setAttribute("region", region); record.setAttribute("product", product); record.setAttribute("sales", sales); return record; } private final Record[] records() { return new Record[] { simpleChartData("West", "Cars", 37), simpleChartData("North", "Cars", 29), simpleChartData("East", "Cars", 80), simpleChartData("South", "Cars", 87), simpleChartData("West", "Trucks", 23), simpleChartData("North", "Trucks", 45), simpleChartData("East", "Trucks", 32), simpleChartData("South", "Trucks", 67), simpleChartData("West", "Motorcycles", 12), simpleChartData("North", "Motorcycles", 4), simpleChartData("East", "Motorcycles", 23), simpleChartData("South", "Motorcycles", 45) }; } }
Comment