Open stevesuh opened 8 years ago
+1
@fyyyyy @stevesuh Same issue here. Have you figured out how to fix this?
Dont use non-integer data for bar charts axis, e.g. date
Has there been any update to this? I see that I can get a time axis with Line Charts, but I cannot seem do it with a basic bar chart - I am getting the same error stated above. There do not seem to be any examples online to compare against. Any help would be appreciated.
Same problem here:
<BarChart
height={30}
data={this.props.history.map(function(item) {
return {
responseTime: item.response_time,
date: item.executed_at,
}
})}
chartSeries={[{
field: 'responseTime',
name: 'Frequency',
}]}
x={(d) => d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ")} //2017-05-26T13:41:53.759145
xScale='time'
/>
dont use date or other formats. only integer axis data seems to be supported
I stuck on same issue, is resolved by any chance?, if so please share, thank you.
I've got a horizontal bar group chart but I'm getting this error. I want date on the y axis and with x I just have some integers. Here I went ahead and set the yDomain.
`import React, { PropTypes } from 'react'; import {BarGroupHorizontalChart} from 'react-d3-basic';
export default class AccountChart extends React.Component { static propTypes = { data: PropTypes.array.isRequired, // this is passed from the Rails controller };
}`
I tried it also with a BarGroupChart and flipped the axes but then I get xScaleSet.bandwidth is not a function. For this one I didn't set the xDomain.
`import React, { PropTypes } from 'react'; import {BarGroupChart} from 'react-d3-basic';
export default class AccountChart extends React.Component { static propTypes = { data: PropTypes.array.isRequired, // this is passed from the Rails controller };
}`
I looked at the previous revision and tried manually monkey patched the previous function call of yScaleSet.rangeBand() but that throws a yScalSet.rangeBand() is not a function. Any ideas?