phetsims / griddle

Dynamic charting library built with Scenery
MIT License
2 stars 4 forks source link

XYChartNode should be able to render axis labels. #80

Closed samreid closed 3 years ago

samreid commented 3 years ago

In https://github.com/phetsims/fourier-making-waves/issues/8 @pixelzoom suggested that XYChartNode should be able to render axis labels. The design for https://github.com/phetsims/fourier-making-waves/issues/8 is under consideration, and this feature may not be used there.

What should the API be for this feature? How would I tell a chart to show major grid labels on the left, and an axis label on the right? How much of this feature should be hard-coded in XYChartNode vs making it easy to add "decorations" to it?

pixelzoom commented 3 years ago

In reference to the x-axis label on this chart:

image

In https://github.com/phetsims/fourier-making-waves/issues/8#issuecomment-724860566, @samreid said:

This seemed an unconventional way to label a chart (at least I couldn't think of any other occurrences like that). But if we think this style will be widely used, let's add it to XYChartNode.

In https://github.com/phetsims/fourier-making-waves/issues/8#issuecomment-724865487, I asked:

What's unconventional about it?

Should I not expect to be able to implement the XY charts in the graphing-lines suite using XYChartNode? Should I have to handle adding the axis labels as decorations? E.g.:

screenshot_673
samreid commented 3 years ago

This may be addressed in https://github.com/phetsims/griddle/issues/86

samreid commented 3 years ago

This is addressed in bamboo, @pixelzoom can this issue be closed?

pixelzoom commented 3 years ago

Yes, addressed by bamboo. Closing.