Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error trying to create MicroBarChart SVG #9

Open
ejaxon opened this issue May 19, 2015 · 5 comments
Open

Error trying to create MicroBarChart SVG #9

ejaxon opened this issue May 19, 2015 · 5 comments

Comments

@ejaxon
Copy link

ejaxon commented May 19, 2015

I am getting an error when I try to create a simple micro bar chart:

   var tstData=[17,2,33,4,10];
   return <div>
               <MicroBarChart data={tstData} />
               <Sparkline data={tstData} />
             </div>

If I delete the MicroBarChart line, the spark line draws fine.

The error is below. It happens in the render function creating the SVG element (not in renderBarChart).

Any ideas? I can make do with the sparkline, but I would prefer the bar chart.
The code I'm using it in is here: https://github.com/DemocracyApps/GBE/blob/master/gbe/resources/assets/js/components/ChangeExplorer.js (test is on line 280, actual use is 253. The spark lines work fine (though I do get a warning: "mutating the [[Prototype]] of an object will cause your code to run very slowly").

"Warning: Component(...): No `render` method found on the returned component instance: you may have forgotten to define `render` in your component or you may have accidentally tried to render an element whose type is a function that isn't a React component." bundle.js:39431:6
"Warning: Don't set the props property of the React element. Instead, specify the correct value when initially creating the element." bundle.js:39431:6
TypeError: ({type:"svg", key:null, ref:null, _owner:null, _context:{}, _store:{props:{}, originalProps:{children:{}}}}) is not extensible bundle.js:26104:4
@KyleAMathews
Copy link
Owner

What version of React are you on? I haven't updated this module for a while so something might of broken on the latest version(s) of React.

@ejaxon
Copy link
Author

ejaxon commented May 19, 2015

I'm on 0.13.1.

I have a deadline next Tuesday, so I'll just go with the Sparklines for now, but would probably switch over after if you get a chance to update.

@KyleAMathews
Copy link
Owner

Not sure what the problem is. I updated the dependencies to the latest version of React and friends and everything works fine.

@ejaxon
Copy link
Author

ejaxon commented May 20, 2015

Hmm. Ok, I’ll give another shot this afternoon to switching out the sparkline for the bar chart. If it doesn’t work, I’ll have to put off figuring out why until after I launch the budget app next week, but I’ll let you know in any case.

Thanks for the quick response though!

Eric

On May 19, 2015, at 11:13 PM, Kyle Mathews [email protected] wrote:

Not sure what the problem is. I updated the dependencies to the latest version of React and friends and everything works fine.


Reply to this email directly or view it on GitHub #9 (comment).

@ejaxon
Copy link
Author

ejaxon commented May 21, 2015

Well, that appeared to fix it on my end - now both sparkling and microbarcharts work. Thanks!

On May 19, 2015, at 11:13 PM, Kyle Mathews [email protected] wrote:

Not sure what the problem is. I updated the dependencies to the latest version of React and friends and everything works fine.


Reply to this email directly or view it on GitHub #9 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants