Closed magarrent closed 3 years ago
Hello! This is my question too! I want to set starting value to different value (not 0). Thank you :)
I have some code for this already that uses dataset.minValue
datasets: [{
value: 12500,
minValue: 10000, // instead of zero
data: [12000, 14000, 16000, 18000], // does not include zero/minValue
backgroundColor: ['green', 'yellow', 'orange', 'red'],
}]
Another option would be to use the first data point as zero/min-value with some flag
datasets: [{
value: 12500,
includesMin: true,
data: [10000, 12000, 14000, 16000, 18000],
backgroundColor: [null, 'green', 'yellow', 'orange', 'red'], // must include null unless removing minValue from data
}]
What do you think?
Hello Good to see you :) Unfortunately, yours didn't work! This the code :
datasets: [{
data: [162,234,306,378,450],
value: 100,
includesMin: true,
min: 90,
backgroundColor: [ 'red', 'orange' , 'yellow' , 'blue' , 'green'],
borderWidth: 2
}]
I tried 2 ways but still same.
I have not pushed any code or published any new release yet.
I'll waiting for new release sir It's important for me (starting value)
Best Regards
I have some code for this already that uses dataset.minValue
datasets: [{ value: 12500, minValue: 10000, // instead of zero data: [12000, 14000, 16000, 18000], // does not include zero/minValue backgroundColor: ['green', 'yellow', 'orange', 'red'], }]
Another option would be to use the first data point as zero/min-value with some flag
datasets: [{ value: 12500, includesMin: true, data: [10000, 12000, 14000, 16000, 18000], backgroundColor: [null, 'green', 'yellow', 'orange', 'red'], // must include null unless removing minValue from data }]
What do you think?
Hi @haiiaaa !
I think minValue: 10000, // instead of zero
it's more intuitive
I have some code for this already that uses dataset.minValue
datasets: [{ value: 12500, minValue: 10000, // instead of zero data: [12000, 14000, 16000, 18000], // does not include zero/minValue backgroundColor: ['green', 'yellow', 'orange', 'red'], }]
Another option would be to use the first data point as zero/min-value with some flag
datasets: [{ value: 12500, includesMin: true, data: [10000, 12000, 14000, 16000, 18000], backgroundColor: [null, 'green', 'yellow', 'orange', 'red'], // must include null unless removing minValue from data }]
What do you think?
Hi @haiiaaa !
I think
minValue: 10000, // instead of zero
it's more intuitive
Is it work for you ?!
@majazdl @haiiaaa is working on it, I supose that it's not available yet
Hello mates!
See my issue here.
I've created this chart with this rang:
[10000, 12000, 14000, 16000, 18000]
The issue here is that the charts doesn't beggins with zero value, and appears like this:
I supose that the chart is beggining with 0, and that is the reason, but, how can I solve this?
Thx!