esbullington / react-d3

Modular React charts made with d3.js
https://reactiva.github.io/react-d3-website/
MIT License
1.75k stars 179 forks source link

enabled to specify domain #306

Closed muddydixon closed 8 years ago

muddydixon commented 8 years ago

Abstract

This p-r enabled to specify domain by JSX.

e.g.

<LineChart
  legend={true}
  data={lineData}
  width='100%'
  height={400}
  viewBoxObject={{
    x: 0,
    y: 0,
    width: 500,
    height: 400
  }}
  title="Line Chart"
  yAxisLabel="Altitude"
  xAxisLabel="Elapsed Time (sec)"
  domain={{x: [,10], y: [-10,]}} // <= this line!!!
  gridHorizontal={true}
/>

Now the domains are depends on only data, though the range of domain is very important to display whole trends and current version hides whole data range.

yang-wei commented 8 years ago

cool ! LGTM !!!

muddydixon commented 8 years ago

thx!