Extension Actions
Import extension-authoring APIs from ggaction/extension; ordinary chart authors should prefer chart actions.
Import action and ChartProgram from ggaction/extension. Primitive methods
are available on programs used by extension actions.
| API | Signature |
|---|---|
| Wrapper | action({ op, description }, implementation) |
| Semantic primitive | editSemantic({ property, value }) or editSemantic({ property, remove: true }) |
| Graphic primitive | createGraphics({ id, type, length?, parent?, before?, after? }) |
| Graphic primitive | editGraphics({ target, property, value }) or editGraphics({ target, remove: true }) |
| Scale actions | createScale({ id, type?, domain?, range?, nice?, zero?, clamp?, reverse?, base?, exponent?, constant?, paddingInner?, paddingOuter?, padding?, align?, palette?, interpolate?, unknown? }), editScale({ id?, type?, domain?, range?, nice?, zero?, clamp?, reverse?, base?, exponent?, constant?, paddingInner?, paddingOuter?, padding?, align?, palette?, interpolate?, unknown? }) |
See Action authoring and Primitive API.