PrimeFaces bar chart: how to hide color in legend?
One data series but each bar has different color.
<p:barChart model="#{bean.model}"/>
Isn't that shown right here in the Demo showcase?https://www.primefaces.org/showcase/ui/chartjs/bar/bar.xhtml
List<String> bgColor = new ArrayList<>();
bgColor.add("rgba(255, 99, 132, 0.2)");
bgColor.add("rgba(255, 159, 64, 0.2)");
bgColor.add("rgba(255, 205, 86, 0.2)");
bgColor.add("rgba(75, 192, 192, 0.2)");
bgColor.add("rgba(54, 162, 235, 0.2)");
bgColor.add("rgba(153, 102, 255, 0.2)");
bgColor.add("rgba(201, 203, 207, 0.2)");
barDataSet.setBackgroundColor(bgColor);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.