I read the Google Charts documentation. https://developers.google.com/chart/int ... on-options and tried everything but still percentage value appears in tooltip and failed to style legend for the chart.<div id="savChart">
<pe:gChart value="#{dashboardMB.dynamicChartObj}" width="400" height="400">
</pe:gChart>
</div>
GChartModelBuilder chartBuilder = new GChartModelBuilder();
chartBuilder.setChartType(GChartType.PIE);
chartBuilder.addColumns("Topping", "Slices");
chartBuilder.addRow("Sleep", 7);
chartBuilder.addRow("Work", 6);
chartBuilder.addOption("tooltip.text", "value");
chartBuilder.addOption("legend","{ position: 'top', 'alignment': 'start' }");
chartSavingModel = chartBuilder.build();
I inspected the page and options for chart was like - chart:"{\"type\":\"PieChart\",\"options\":{\"pieSliceText\":\"value\",\"tooltip\":\"{text: \\u0027value\\u0027}\",\"legend\":\"{ position: \\u0027top\\u0027, \\u0027alignment\\u0027: \\u0027start\\u0027 }\"}. Came to a conclusion that may be JSON data is created incorrectly. I am not able to fix my problem.