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

attach range to labels #14

Open
chantellecarr opened this issue Aug 7, 2019 · 6 comments
Open

attach range to labels #14

chantellecarr opened this issue Aug 7, 2019 · 6 comments

Comments

@chantellecarr
Copy link

Hi, This speedometer is great. I would like to have an unequal split of labels against values.
i.e. I have the following
labels={[
{
name: 'High Risk',
labelColor: '#ff2900',
activeBarColor: '#ff2900',
},
{
name: 'Medium Risk' ,
labelColor: '#f4ab44',
activeBarColor: '#f4ab44',
},
{
name: 'Low Risk',
labelColor: '#00ff6b',
activeBarColor: '#00ff6b',
},
I would like to assign value 0-15 to High Risk, value 16-60 to Medium Risk, value 61-100 to Low Risk. Can you please help me to do this?
Thank you

@pritishvaidya
Copy link
Owner

pritishvaidya commented Aug 8, 2019 via email

@luizjr
Copy link
Contributor

luizjr commented Dec 8, 2019

Hello, Unfortunately, I didn't get the time to make unequal splits in the speedometer. It should be an easy fix though, you can modify it to pass some prop such as degree and modify the degree util to use this rather than the calculations that we already have. I am busy with some other tasks right now, so I can't estimate when this would be completed. Thanks

On Wed, Aug 7, 2019 at 7:27 PM Chantelle Carr @.***> wrote: Hi, This speedometer is great. I would like to have an unequal split of labels against values. i.e. I have the following labels={[ { name: 'High Risk', labelColor: '#ff2900', activeBarColor: '#ff2900', }, { name: 'Medium Risk' , labelColor: '#f4ab44', activeBarColor: '#f4ab44', }, { name: 'Low Risk', labelColor: '#00ff6b', activeBarColor: '#00ff6b', }, I would like to assign value 0-15 to High Risk, value 16-60 to Medium Risk, value 61-100 to Low Risk. Can you please help me to do this? Thank you — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#14?email_source=notifications&email_token=AEYFRTPIDRWBVJRLD2FDK3TQDLIEBA5CNFSM4IKAWB62YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HD44B3A>, or mute the thread https://github.com/notifications/unsubscribe-auth/AEYFRTJEYJEJRR7TYAEDJATQDLIEBANCNFSM4IKAWB6Q .

Any predictions for this to happen?

@ilakkiah
Copy link

Any update on this for showing labels based on split

@mbalbera
Copy link

mbalbera commented Jun 25, 2020

@ilakkiah I made unequal splits by doing the following. Basically I found the ratios of things I needed and did it like that i think i have 3 low, 3 medium, 4 high
const labels =[
{
labelColor: "rgb(0,202,148)",
activeBarColor: "rgb(0,202,148)",
name: 'Low Risk',
key: 1,
},
{
labelColor: "rgb(0,202,148)",
activeBarColor: "rgb(0,202,148)",
name: 'Low Risk',
key: 2,
},
{
labelColor: "rgb(0,202,148)",
activeBarColor: "rgb(0,202,148)",
name: 'Low Risk',
key: 3,
},
{
labelColor: "rgb(255,150,48)",
activeBarColor: "rgb(255,150,48)",
name: 'Medium Risk',
key: 4,
},
{
labelColor: "rgb(255,150,48)",
activeBarColor: "rgb(255,150,48)",
name: 'Medium Risk',
key: 5,
},
{
labelColor: "rgb(255,150,48)",
activeBarColor: "rgb(255,150,48)",
name: 'Medium Risk',
key: 6,
},
{
labelColor: "rgb(252,32,28)",
activeBarColor: "rgb(252,32,28)",
name: 'High Risk',
key: 7,
},
{
labelColor: "rgb(252,32,28)",
activeBarColor: "rgb(252,32,28)",
name: 'High Risk',
key: 8,
},
{
labelColor: "rgb(252,32,28)",
activeBarColor: "rgb(252,32,28)",
name: 'High Risk',
key: 9,
},
{
labelColor: "rgb(252,32,28)",
activeBarColor: "rgb(252,32,28)",
name: 'High Risk',
key: 0,
},
]

@swaroopaillinda
Copy link

hi

I also need to split the speedometer into unequal parts based on percentage
how can I do that I did not find any property for that

can you tell me how to implement it.

Thanks

@swaroopaillinda
Copy link

@pritishvaidya Have you added unequal splits
Its is needed urgently so Please can you tell me when it is completed

or give any other suggestion to achieve this

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

6 participants