The upper table and Piechart shows the values for the duration in seconds.
And the labels on the Piechart shows ok.
The lower table and Pierchart show are showing the duration in more ‘readable’ format (hours:minutes:seconds).
But the labels on the Piechart are not showing, what is in the table…?
Is it possible somehow to show the duration in Piechart labels like HH:MM:SS?
SELECT
RIGHT(a.source,- POSITION('alm:' in a.source)-3) alarm,
TO_CHAR((SUM(EXTRACT(EPOCH FROM (COALESCE(c.eventtime, CURRENT_TIMESTAMP) - a.eventtime))) || ' second')::interval, 'HH24:MI:SS') AS duration
FROM
alarm_events a
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
WHERE a.eventtype = 0 AND a.eventflags != 1
GROUP BY
a.source
ORDER BY
duration desc, a.source ASC
What I’m trying to do is show a more readable time format in the Pie Chart label…
Ah, and this is now in Ignition Vision 8.1.7.
There’s really no great solution. Even in the exchange template, notice how the label is showing 0 or 1? The value has already been coerced into a number by this point, so precision has already been lost. You can technically go ‘back’ to the original dataset via configureChart, but it’s not great…