Closed a2raoof closed 7 years ago
Hi @a2raoof,
Please send enough code to reproduce the issue and I can take a look.
Best, Alex
Hi @alexgig
I was able to produce the issue with:
` const options = { width: 500, height: 400, };
const data = {
labels: ['A', 'B', 'C'],
series: [
{name: 'A', value:[2, 2.5, 1]},
{name: 'B', value:[3, 3, 2]},
{name: 'C', value:[4, 1, 1]}
]
} const bar = generate('line', options, data);`
Thanks
Tried this:
` var options = { width: 500, height: 400, };
const data = { // A labels array that can contain any sort of values labels: ['A', 'B', 'C'], // Our series array that contains series objects or in this case series data arrays series: [ {name: 'A', value:[2, 2.5, 1]}, {name: 'B', value:[3, 3, 2]}, {name: 'C', value:[4, 1, 1]} ] } const bar = generate('line', options, data);`
But still getting the error. I tried changing everything to var instead of const and still getting
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Assignment to constant variable.
version of node?
v6.8.0
Do I need to update this to the latest? It was working with this version of node prior to the update to node-chartist v1.0.1
EDIT: Updated to v6.9.3 and still getting the error.
Should be good to go. Tests pass on node v6.9
v1.0.2 published
Great! Works :)
Thanks for the help and quick response (Y)
Excellent. You're welcome and thanks for posting the issue.
Happy charting! :-)
Best, Alex
I am getting an error:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Assignment to constant variable.
After updating to node-chartist 1.0.1
This happens during the following call
const bar = generate('line', options, data).then((output) => { ... }
I have tried setting the options both using the new Chartist object introduced in this update and without. I tried reverting back to a previous version and it works fine, but I do want to have access to the Chartist options.