Broken and unclear documentation
See original GitHub issueExpected Behavior
I’m trying to get a line chart working but it’s quite hard since the Line documentation examples are broken and quite unclear because, for instance, the first example code look like this:
const lineData = require('./lineChart.fixtures').default;
const ResponsiveContainer = require('../helpers/responsiveContainer.js').default;
const margin = {
top: 60,
right: 30,
bottom: 60,
left: 70,
};
const renderLine = (props) => (
<ResponsiveContainer
render={
({width}) =>
<Line
margin={margin}
lineCurve="basis"
width={width}
{...props}
/>
}
/>
);
<Tooltip
data={lineData.oneSet()}
render={renderLine}
topicLabel="topics"
title="Tooltip Title"
/>
The import of the <Line>
component seem to be missing?
Current Behavior
After searching a lot, I got a working chart, and I wanted to changed the axisTimeCombinations
prop. I see there should be some constants to be used (here too, the documentation has a formatting issue on the constant names):
MINUTE_HOUR, HOUR_DAY, DAY_MONTH, MONTH_YEAR
But I can’t find them in this package so I tried to use 0
and then 1
, hoping to find a good one by any luck but then it fails with the following error:
Uncaught TypeError: t[e] is not a function
React 11
unstable_runWithPriority scheduler.development.js:661
React 5
unstable_runWithPriority scheduler.development.js:661
React 4
Redux 7
fetchOneResponseTimes actions.js:21
britecharts-react.min.js:49
o React
o self-hosted:954
forEach self-hosted:225
React 10
commitRootImpl self-hosted:954
unstable_runWithPriority scheduler.development.js:661
React 4
performSyncWorkOnRoot self-hosted:897
flushSyncCallbackQueueImpl React
unstable_runWithPriority scheduler.development.js:661
React 4
Redux 3
handleChangeWrapper self-hosted:850
The package JavaScript seems to be minified, so it’s unreadable 🤷♂️.
Here is my code so far:
<ResponsiveContainer
render={
({ width }) => (
<Line
axisTimeCombinations={2}
data={{ data: oneResponseTimes }}
lineCurve="basis"
margin={{
top: 60,
right: 30,
bottom: 60,
left: 70
}}
height={200}
width={width}
/>
)
}
/>
BTW I can’t get the <ResponsiveContainer>
component to update the width
.
Your Environment
- Britecharts-React version used: latest (0.5.4)
- Browser Name and version: Firefox 78.5.0esr (64-bit)
- Operating System and version: Linux Debian Buster
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
Totally understand! We have left aside Britecharts React for too long while we prepare Britecharts V3. Hopefully you will get all the new goodness when you are back to check!
Thanks for the issue @zedtux! Sorry for that, I will try to jump into this during the weekend!