Describes chart state settings.
A number of objects have state settings that define their appearance when in a particular state such as a button's hover appearance.
States of an object are interpreted as having an order in which they occur, for example, a button has states such as Normal, Hover, Clicked and they occur in that order. JSC implements functionality that considers this order and helps cascade the settings from one state to the next. For example, if a font is specified for the normal state, it will propagate to subsequent states automatically and not require the user to specify the same setting for each state. If a setting is specified for the hover state, it will propagate to the clicked state, but not back to the normal state.
Cascading state settings don't just propagate through states, settings of the previous state are used as a starting point, and then they are modified so that the visual difference between states is still obvious. For example, setting a button's fill color to orange will propagate that color to the hover state but will darken it slightly to indicate the button is in a different state.
This functionality is highly tuned to give the best visual results with the least amount of settings and let the developer focus on other core requirements.
The following table lists objects that implement states and the states available for each.
|legendEntry||Hover, Hidden||Legend entry states.|
|series||Hover Select||Series States. Applicable mainly to line/area series types.|
|button||Hover, Select||States for resetZoom, print,export buttons include only hover. Select state applies to navigator quickZoom buttons.|
|point||Hover, Select||Data point states.|
|pointMarker||Hover, Select||Data point marker states.|
Data objects including series, point, and pointMarker have the most complex sequence and architecture of state property propagation because points include point markers. However, this complexity is there working behind the scenes and reduces the need to think about all the states and settings. The intention of this functionality is to simply work as expected despite having a complicated API architecture. For example, with a marker series type, the setting point.hover.outline.color setting can also be set through point.marker.states.hover.outline.color or point.states.marker.outline.color. Each of these should work and the approach is up to the developer, however, using setting point.hover.outline.color is ideal because it will affect the data point's outline whether it's a marker, bar, or any other type that uses an outline. This API is there for when bars and other series types support markers.