Jump to content

TUnichart, how do I show the Y scale with 3 decimals,


Gerardo Arana

Recommended Posts

3 hours ago, Gerardo Arana said:

I have a TUnichart, how do I show the Y scale with 3 decimals,
what happens is that I have 3 lines where I have a max of 0.020, min of 0.001 and the values in that range

Hello,

Can you try this approach?

UniChart -> ClientEvents -> ExtEvents -> Ext.chart.CartesianChart [chart] -> function chart.redraw:

function chart.redraw(sender, eOpts)
{
    this.axes[0].setRenderer(function(d, b, c, f) {
        if (Ext.isArray(d.cLables)) {
            var a = d.uLastIx;
            if (f === null) {
                a = 0
            }
            d.uLastIx = a + 1;
            if (a < d.cLables.length) {
                return d.cLables[a]
            }
        }
        if (d.hideLabel == true) {
            return ""
        }
        if (Ext.isNumber(b)) {
            return Ext.util.Format.number(b, "#.000")
        }
        return b
    })
}

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
×
×
  • Create New...