1

I feel the answer is so obvious and simple but I can't find it.

Im visualizing a lineSeries chart with react-vis. My x data is 1,2,3,4,5 and so on. Y are kilograms. But the x-axis rendert shows not only 1,2,3,4 ... but shows it 1.0, 2.0, 3.0 plus extra numbers (al the halfs, 0.5, 1.5...etc) I don't know how to solve this and get it to just show the numbers given.

Code I use is this:

<XYPlot
 height={300}
 width={800}
 yDomain={[70,110]}>
  <LineSeries
   data={plotArray}
   color="#2c2c2c"
   opacity={1}
   style={{ fill: 'none'}}
  />
  <XAxis />
  <YAxis />
</XYPlot>

EDIT: i found this which make the numbers 1,2,3,4,5 but on the x- axis it still shows the .5 lines. like this.

example x-axis

heisenberg
  • 153
  • 1
  • 13

0 Answers0