StyleRule
Type class
Defines a class for a CSS rule.
Can be used to dynamically add CSS to the document.
Sources
StyleRule can be used (imported) via one of the following packages.
/** * Import from: "core.ts" * Use like: am4core.StyleRule */import * as am4core from "@amcharts/amcharts4/core";/** * Include via: <script src="core.js"></script> * Access items like: am4core.StyleRule */Inheritance
StyleRule extends Disposer.
StyleRule is not extended by any other symbol.
Properties
selectorType
stringA CSS selector text.
E.g.:
.myClass p
Methods
constructor(element:ShadowRoot|null,
selector:string,
styles:object)Returns
StyleRuleConstructor.
setStyle(name:string,
value:string)Returns
voidSets a value for specific style attribute.
2 inherited items
dispose()Returns
voidInherited fromDisposerDisposes the object.
isDisposed()Returns
booleanInherited fromDisposerChecks if object is disposed.
Events
StyleRule does not have any events.