-
Notifications
You must be signed in to change notification settings - Fork 4
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
Options for BarChartNode labels #34
Comments
Done in the above commit. @Denz1994 would you please review? |
Thanks for handling this @jessegreenberg. My only suggestion would be to allow the client to pass in // passed along to the RichText
options.barLabelOptions = _.extend( {
font: new PhetFont( { size: 12, weight: 'bold' } ),
// chosen by inspection, good for short labels
maxWidth: 40,
rotation: -Math.PI / 2
}, options.barLabelOptions ); This would remove the below assertion and declaration in assert && assert( options.barLabelOptions.rotation === undefined, 'label rotation set for BarChartNode orientation' );
options.barLabelOptions.rotation = -Math.PI / 2; The initial reason for defaulting to vertical labels was so they would fit on the x-axis in the current sims using /**
* Bar chart for sims that need to display separate values
*
* TODO: Add horizontal support
* |
That sounds great @Denz1994, thanks for reviewing. Done in the above commit, can you take a look? Anything else for this issue? |
Looks great. I'll close this issue. Thanks for handling this. |
One of the TODOs mentioned in #29 is
I need to set the maxWidth of the label for phetsims/energy-skate-park#31 so Ill add the options.
The text was updated successfully, but these errors were encountered: