Zelter Ady
Zelter Ady

Reputation: 6348

jqplot: special scale graphs options

I use jqplot to draw a graph. I have a huge difference between point values: point a is 2, point 2 is 5, point 3 is 500, point 4 is 10.

The jqplot scale system builds correct the graph, but because of such big difference the smaller values are represented as tiny lines, almost not visible on the graph (point a is not visible, point b is a tiny line).

In order to better see the values representation I'd like to build soemething like this (photoshop image, not jqplot render):

Example:

enter image description here

Is any way to do this? I don't even know how is called this option, but I know I saw in some graphs something like this. Do I have an option in jqplot to enable this?

Thank you.

Upvotes: 0

Views: 323

Answers (1)

AnthonyLeGovic
AnthonyLeGovic

Reputation: 2335

You can define your y-axis as a logarithmic axis :

axes: {
  yaxis:{ 
    renderer: $.jqplot.LogAxisRenderer
  }
}

after having included this file : <script type="text/javascript" src="../plugins/jqplot.logAxisRenderer.(min.)js"></script>

You can find an example here, and some documentation here

Upvotes: 1

Related Questions