Custom Fitness Charts

Is it possible to create a custom javascript based chart in the fitness tab? I want to customise the transformation of several metrics e.g. build some different logic into the fitness style EWMA calculation. My first thought was to do it as an activity field then plot it but I don’t think the field within an activity would be able to account for other activities done on the same day or would it?

The reason is that I want to make a fitness chart using slightly more complex logic than standard