Hello everyone i’m working with a bar chart using D3.js as the data to come in i would like to use a variable obtained from a range object (input1 in my html)
here is a snippet of the code im using a value of 800 for the data :
const ranges = ['input1'];
const data = [
{ name: 'Rust', score: '800' },
This works fine, but i can’t get it to use my contant; “ranges” (displaying the input from the range object)
const ranges = ['input1'];
const data = [
{ name: 'Rust', score: 'ranges' },
It doesn’t display any value in the bar chart.
Does anybody know how i can callback my variable from the range object as a value for the bar chart? any help is appreciated.