in packages/showcase/axes/custom-axis-tick-format.js [45:75]
render() {
const data = [
{x: 0.042, y: 100},
{x: 0.051, y: 1200},
{x: 0.063, y: 1600},
{x: 0.07, y: 1300},
{x: 0.073, y: 1220}
];
const xMin = Math.min(...data.map(e => e.x));
const xMax = Math.max(...data.map(e => e.x));
const yMin = 0;
const yMax = Math.max(...data.map(e => e.y));
return (
<XYPlot
width={300}
height={300}
xType="linear"
xDomain={[xMin, xMax]}
yType="linear"
yDomain={[yMin, yMax]}
margin={{top: 10, right: 10, left: 60, bottom: 40}}
>
<VerticalGridLines />
<HorizontalGridLines />
<XAxis tickFormat={Example._xTickFormatValue} />
<YAxis tickFormat={Example._yTickFormatValue} />
<LineSeries data={data} />
</XYPlot>
);
}