Skip to content

Loading…

Can't reduce the number of labels without reducing the number of #11

Closed
pyrzak opened this Issue · 2 comments

2 participants

@pyrzak
  <script>
  valuesArray = eval(document.getElementById("values").innerHTML);
  graph = new Ico.LineGraph(document.getElementById( 'graph' ), valuesArray, { meanline: { stroke: '#AA0000' },  colours: { one: '#990099'}, grid: true} );

  </script>

If I have code that looks like the above, as far as I can tell, there is no way to reduce the number of x axis labels/grid lines, without changing how they are plotted. Ideally I would be able to define how many ticks should appear on the x axis and then define them without impacting the plotting.

@alexyoung
Owner

That shouldn't be a problem, I'll add it to my to-do list

@alexyoung alexyoung closed this in c4586d0
@alexyoung
Owner

I've made an example for you that fixes this in Ico 0.3.7:

http://jsfiddle.net/NF8fH/1/

If you specify an array of labels it'll now scale the grid accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.