-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ability to set selected section #79
Comments
Grab the latest master, then calling I've just added some code that should do what you need. |
Hey OIly that was quick! Its broken somehow though. When I hover over a segment I get TypeError: 'undefined' is not an object (evaluating 'segment.select') It looks like when it loads it passes an id to select but on hover it passes the DonutSegment |
Whoops - my fault for coding too late at night! :) Try again now - should be fixed. |
Brilliant all working now thanks! |
I'm so sorry for asking silly questions, but I'm new to this chart. so if anyone kind enough to help me: below is my code:
every time it initially selects 'Added' value, I've tried flipping position with 'Sold' but no luck. how can I select my desired label? I don't want to select the lowest value coz there will be more items. Then please let me know. I'm asking this question coz I didn't understood what to do with
Thank you |
i have same question, please reply @oesmith |
Just do like this: var my_chart = Morris.Donut({
element: 'chart_test',
resize: true,
data: [{
value: 2,
label: "good"
},{
value: 3,
label: "not ok"
}],
});
// Then below, choose which one you want to select
my_chart.select(0); // to select data with "good" label
my_chart.select(1); // to select data with "not ok" label |
Is it possible to set the selected area of a donut?
Use Case:
{ label: 'Total', value: total },
{ label: 'Remaining', value: remaining }
I want to select remaining if it is larger than total
The text was updated successfully, but these errors were encountered: