question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Broken and unclear documentation

See original GitHub issue

Expected 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:closed
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Golodhroscommented, Nov 24, 2020

Just to let you know: I’ve switched to another library, but it’s cool you’re fixing all that things. Will see in a next project if this lib is strong enough 😉

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!

1reaction
Golodhroscommented, Nov 20, 2020

Thanks for the issue @zedtux! Sorry for that, I will try to jump into this during the weekend!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation by the Nurse
Purpose of documenting. ❖ Clear, complete, and accurate health records serve many purposes for residents, families, nurses, and other health.
Read more >
Documentation, information and support - Fractures ... - NCBI
Accurate, comprehensive and relevant documentation is generally accepted as an ... of solutions like repositioning the fractured limb to relieve the pain, ...
Read more >
Nursing Documentation - Harmony Healthcare International
Clear, concise, and comprehensive. Accurate, truthful and honest; documentation should not appear self-serving, especially if an incident or injury occurs.
Read more >
Nursing Documentation
Care Documentation. Case 1. A 27-year-old male patient presents to a hospital emergency department with several fractured ribs and a broken left arm....
Read more >
CHART Documentation Format Example - RC Health Services
The CHART and SOAP methods of documentation are examples of how to structure your ... o Chest: Breath sounds are clear and equal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found