Cannot Clear Error for BarChart
See original GitHub issueIssue Description
I am getting a recurring type error in bundle.js file.
"Cannot read property 'map' of undefined" in bundle.js for BarChart
An object is undefined and trying to map to an array, but I am not sure where this is coming from because the failure is in a minified script (in bundle.js). As you can see this is the example code straight from github.
Am I doing something wrong, or is this an issue?
var React = require('react');
var ReactDOM = require('react-dom');
var Display = require('./parts/display');
var d3 = require('d3');
var BarChart = require('react-d3-components').BarChart;
var scope;
class board extends React.Component
{
constructor()
{
super()
scope=this;
}
render()
{
var data = [{
label: 'Answer',
values: [{x: 'SomethingA', y: 10}, {x: 'SomethingB', y: 4}, {x: 'SomethingC', y: 3}]
}];
debugger;
console.log(JSON.stringify(this.props.results));
return(
<div id='scoreboard'>
<Display if={this.props.status === 'connected' && this.props.currentQuestion.q}>
// <BarChart data={this.props.results} title={this.props.currentQuestion.q} height={window.innerHeight * 0.6} width={window.innerWidth * 0.9}/>
<BarChart
data={data}
width={400}
height={400}
title="Answer Results"
xScale={1}
yScale={1}
margin={{top: 10, bottom: 50, left: 50, right: 10}} />
</Display>
<Display if={this.props.status === 'connected' && !this.props.currentQuestion.q}>
<h3>Awaiting a Question...</h3>
</Display>
</div>
);
}
}
module.exports = board;
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Add, change, or remove error bars in a chart - Microsoft Support
Add or remove error bars · Click anywhere in the chart. · Click the Chart Elements button Chart Elements button · To change...
Read more >Error for bar chart in matplotlib python 3 - Stack Overflow
I am trying to make a bar graph (from mean values) that includes error bars (from standard deviation values) ...
Read more >How to add error bars in Excel: standard and custom - Ablebits
To remove all error bars from your graph, click anywhere within the chart, then click the Chart Elements button and clear the Error...
Read more >The issue with error bars - From data to Viz
The second issue with error bars is that they are used to show different metrics , and it is not always clear which...
Read more >OK button greyed out when creating a stacked bar chart - IBM
There are two ways to work around this situation: 1. Select the 'Reset' button in the Chart Builder window and rebuild your chart...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@solomein thank you! Your help is appreciated 😃 Are you still working on the fixes you told me? I will merge any pullreqs 😃
@WiseNN I am glad the problem is fixed! Good luck 😃
@WiseNN You are using the wrong comment style at this place
//
doesn’t work, you should use{/* code */}