Reverse Y-Axis

35 views
Skip to first unread message

Randomrileywat

unread,
Feb 19, 2016, 10:28:40 AM2/19/16
to Flot graphs
In this case, I need my Y-axis to go in reverse order (60 being at the bottom and 0 at the top) on my graph. Any ideas on how I can do this?

Thanks! 
Randomrileywat

Ced

unread,
Feb 19, 2016, 10:23:33 PM2/19/16
to Flot graphs, randomr...@yahoo.com
The documentation provides an example of this exact thing.  Search for transform and inversetranform.

Andrew Boetto

unread,
Feb 20, 2016, 12:00:25 PM2/20/16
to Flot graphs, randomr...@yahoo.com
Add the inverseTransfor and transform to the Y Axis options. That worked for me.



    {     position: "right",
                    min: 0,
               transform: function (v) { return -v; },
               inverseTransform: function (v) { return -v; },
                 axisLabel: 'Tips',
                 axisLabelPadding: 10
        },
Reply all
Reply to author
Forward
0 new messages