Skip to content

PieChartModel primefaces 13.0.0 #73

Closed Answered by zapeSpawn
zapeSpawn asked this question in PrimeFaces
Discussion options

You must be logged in to vote

I finally solved it by redefining the client-side tooltip:

<p:barChart model="#{infInformeClientes.stackedBarLlamadasTiempoConversadoModel}" style="width: 100%; height: 500px;" widgetVar="stackedBarLlamadasTiempoConversadoModelWgt"/>
<script>
PrimeFaces.widgets.stackedBarLlamadasTiempoConversadoModelWgt.cfg.config.options.plugins.tooltip = {
callbacks: {
label: function(context) {
let label = context.label || '';
if (label) {
label += ': ';
}
if (context.raw !== null) {
const horasMinutos = segundosAHorasYMinutos(context.raw);
label += (horasMinutos.horas + ":" + horasMinutos.minutos);
}
return label;
}
}
};
PrimeFaces.widgets.stackedBarLlamadasTiempoConversadoModelWgt.refresh(PrimeFaces.…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jepsar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants