0

If I want to plot a datapoint (a circle) on my graph I need to give it and x/y coordiante. My y-axis has numbers but I formatted my x-axis to have custom names labels. These custom labels places with a distance of 100 pixels each with tickValues e.g. 100,200,300 etc.

        xAxis = d3.svg.axis()
            .scale(xScale)
            .orient("bottom")
            .tickValues(createTickValuesArray(arr.length))
            .tickFormat(formatAxis);

createTickValuesArray just generates the array of numbers for me.

If I want to plot a datapoint do I need to give it a numeric value? Or can I use the label names from my x-axis somehow?

Sina Sohi
  • 2,719
  • 9
  • 33
  • 50

0 Answers0