SceneElement Class
An element of a ChartScene.
public abstract class SceneElementProperties
| Name | Description |
|---|---|
| CssClass | Gets or sets the CSS class of the element in the SVG output. |
| DataAttributes | Gets the data-* attributes of the element in the SVG output, by name without the data- prefix. Scripts of a web page read them with element.dataset. Set them with SceneElement.SetDataAttribute. |
| Opacity | Gets or sets the opacity of the element, from 0 to 1. |
| Tooltip | Gets or sets the text shown when hovering the element (an SVG title). |
CssClass
SceneElement.csDataAttributes
SceneElement.csGets the data-* attributes of the element in the SVG output, by name without the data- prefix. Scripts of a web page read them with element.dataset. Set them with SceneElement.SetDataAttribute.
public IReadOnlyDictionary<string, string> DataAttributes { get; }Property value
Opacity
SceneElement.csTooltip
SceneElement.csMethods
| Name | Description |
|---|---|
| SetDataAttribute(string, string?) | Sets a data-* attribute of the element in the SVG output, or removes it. |
SetDataAttribute(string, string?)
SceneElement.csSets a data-* attribute of the element in the SVG output, or removes it.
Parameters
namestring- The name of the attribute without the
data-prefix: lowercase ASCII letters, digits, hyphens, underscores and dots. valuestring?- The value, or
nullto remove the attribute.
Exceptions
ArgumentExceptionnameis empty or contains another character.