ChartDirector Time Math Question

I’m using a goofy hack to display tooltips on data points using ChartDirector.
Turns out, one can set the title HTML attribute on data points to tap into the underlying HTML functions of ChartDirector to get tooltips that display the actual values for that point. The thing is it is being set in the HTMLImageMap after the chart is generated, so access to values is now limited. All math must be performed in the tag, meaning only simple math is allowed.

One of the values I have is a time value in decimal format (ie 10.5 minutes) and I’d like to display it in time format (10:30)

I’ve searched around to try to find a mathematical function that could perform this conversion, but everywhere I look the answer is to split the decimal off from the minute value and multiply it to get the seconds value. I’ve been scratching my head, I don’t think I can pull that off with the Parameter Substitution and Formatting tools.

Has anyone done this conversion with ChartDirector, know any better formulas, or have any advice?

Multiply by 60 and then use Mod 60 to get seconds and floor (n/60) for minutes.

I don’t think there’s a way to do math with variables in the HTMLImageMap with ChartDirector which was the major issue.

I did come up with a workaround. After re-reading the documentation over and over, I finally noticed I could use {field0} in HTMLImageMap. This allows me to do the math in Xojo using variables, and I can pass the string to the HTMLImageMap by setting the field data using addExtraField.

Thanks for your help!