yang-wei / rd3

react + d3
https://yang-wei.github.io/rd3/
MIT License
319 stars 83 forks source link

Cannot assign to read only property 'data' of object '#<Object>' #49

Open mistre83 opened 8 years ago

mistre83 commented 8 years ago

I'm trying to use LineChart with Dates and i've just copied this example but i get the error on issue title.

This is a jsfiddle example: https://jsfiddle.net/cnomx3w1/

yang-wei commented 8 years ago

Unlike AreaChart, we do not process date object in LineChart (which is not consistent)

Would you like to give it a try ?

mistre83 commented 8 years ago

Yes, I can evaluate to use AreaChart instead of LineChart. At the end, it have all information i need.

Just to be sure, i have a set of measurements and this can be registered by hour, so i will have to use "hour" as tick interval on the X axis. For the Y axis, i dont have a fixed "cap".

For example, one chart can have a cap of 10k, and another can have a cap to 1k. I will use this as "generic" container, so i cant provide a cap.

How i can configure AreaChart to have this behaviour ?

In xAxisTickInterval i can say:

xAxisTickInterval={{unit: 'hour', interval: 2}} ?