UNPKG

webwriter-chart

Version:

ww-chart is an interactive data visualization widget for the WebWriter tool that implements various charts and diagrams for static and exploratory data visualization.

19 lines (16 loc) 575 B
import { LitElementWw } from "@webwriter/lit"; import { property } from "lit/decorators.js"; import { ChartState } from "./interfaces"; export default class StateComponent extends LitElementWw { @property({ type: Object, attribute: true, reflect: true }) accessor sharedState: ChartState; dispatchStateChange() { this.dispatchEvent( new CustomEvent("wwci-state-change", { detail: { state: this.sharedState }, bubbles: true, // Ensure event bubbles up composed: true, // Ensure event crosses shadow DOM boundary }) ); } }