Get percentage share timeseries graph for a metric by facet

Get Percentage share timeseries graph for a metric by facet

SELECT sum(statechange.causalevent.count) FROM Metric TIMESERIES facet algorithm

I would like the timeseries graph above to show the percentage of each facet. How to do this?