I recreated the sample page shown in the window of strokes:
http://www.primefaces.org/showcase/ui/chart/pie.xhtml
The pie chart has been successfully displayed, and I can set up the pie chart model for the available setters and getters, but overhanging a piece of the pie does not display a tooltip at all.
This is not a browser issue, since in the same browser, tooltips are displayed on the demo site.
The jqplot-highlighter-tooltip pointer is displayed in the html source, but it does not update on hover. There are no errors in the javascript console.
I am using the 5.2 maven dependency and also tried 4.0 - but no change.
Would thank for any ideas.
Thank.
The managed bean code is as follows:
package org.primefaces.examples;
import org.primefaces.model.chart.PieChartModel;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import java.io.Serializable;
@ManagedBean
public class ChartView implements Serializable {
private static final long serialVersionUID = 1075867144472594293L;
private PieChartModel pieModel1;
private PieChartModel pieModel2;
@PostConstruct
public void init() {
createPieModels();
}
public PieChartModel getPieModel1() {
return pieModel1;
}
public PieChartModel getPieModel2() {
return pieModel2;
}
private void createPieModels() {
createPieModel1();
createPieModel2();
}
private void createPieModel1() {
pieModel1 = new PieChartModel();
pieModel1.set("Brand 1", 540);
pieModel1.set("Brand 2", 325);
pieModel1.set("Brand 3", 702);
pieModel1.set("Brand 4", 421);
pieModel1.setTitle("Simple Pie");
pieModel1.setLegendPosition("w");
}
private void createPieModel2() {
pieModel2 = new PieChartModel();
pieModel2.set("Brand 1", 540);
pieModel2.set("Brand 2", 325);
pieModel2.set("Brand 3", 702);
pieModel2.set("Brand 4", 421);
pieModel2.setTitle("Custom Pie");
pieModel2.setLegendPosition("e");
pieModel2.setFill(false);
pieModel2.setShowDataLabels(true);
pieModel2.setDiameter(150);
}
}
:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head/>
<h:body>
<p:chart type="pie" model="#{chartView.pieModel1}" style="width:400px;height:300px" />
<p:chart type="pie" model="#{chartView.pieModel2}" style="width:400px;height:300px" />
</h:body>
</html>