{
  "$schema": "https://next.0build.dev/schema/component.v1.json",
  "accessibility": {
    "aria": [
      {
        "attributes": [],
        "description": "Chart container; no static ARIA attributes.",
        "part": "chart"
      },
      {
        "attributes": [
          {
            "name": "aria-live",
            "value": "assertive"
          },
          {
            "name": "role",
            "value": "alert"
          }
        ],
        "description": "Error alert: `role=\"alert\"` with `aria-live`.",
        "part": "error"
      },
      {
        "attributes": [
          {
            "name": "aria-label",
            "value": "${ariaLabel}"
          },
          {
            "name": "role",
            "value": "img"
          }
        ],
        "description": "Chart region labeled by `chart-label`.",
        "part": "host-inner"
      },
      {
        "attributes": [
          {
            "name": "aria-label",
            "value": "${message}"
          },
          {
            "name": "aria-live",
            "value": "polite"
          },
          {
            "name": "role",
            "value": "status"
          }
        ],
        "description": "Loading status: `role=\"status\"` with `aria-live` and the loading label.",
        "part": "loading"
      }
    ],
    "notes": [
      "Loading and error states are announced through live regions; the chart region itself is labeled."
    ]
  },
  "attributes": [
    {
      "default": "false",
      "description": "Defers chart initialization until set back to false; shows the loading state meanwhile.",
      "from": null,
      "name": "loading",
      "property": "loading",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "'100%'",
      "description": "Chart width passed to ApexCharts (default `100%`).",
      "from": null,
      "name": "width",
      "property": "width",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "'auto'",
      "description": "Chart height passed to ApexCharts (default `auto`).",
      "from": null,
      "name": "height",
      "property": "height",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Per-instance text overrides as `key: text` pairs, merged over the global `z-i18n` script and the built-in defaults.",
      "from": "Hwc",
      "name": "i18n",
      "property": "i18n",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Floating UI placement options (for example `offset` and `shiftPadding`) parsed as `key: value` pairs.",
      "from": "Hwc",
      "name": "floating",
      "property": "floating",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "false",
      "description": "Skips re-rendering after the first render; an existing `data-host-inner` child is adopted as the rendered DOM.",
      "from": "Hwc",
      "name": "force-prevent-rerender",
      "property": "force-prevent-rerender",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "''",
      "description": "Selector or id of an external element or `<template>` whose inner content is cloned in place of an inline `template[data-fn=\"template\"]` child.",
      "from": "Hwc",
      "name": "template",
      "property": "template",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Adds classes to named parts as `key: classes` pairs; a plain string targets the default part.",
      "from": "Base",
      "name": "cls",
      "property": "cls",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Adds inline styles to named parts as `key: styles` pairs; a plain string targets the default part.",
      "from": "Base",
      "name": "stl",
      "property": "stl",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    }
  ],
  "category": "data",
  "children": [
    {
      "attributes": [
        {
          "description": "Marks the script as configuration (value: `config`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "config"
          ]
        },
        {
          "description": "Re-parses the configuration when the script mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "description": "JSON configuration script parsed by the base class (i18n, cls, stl, floating).",
      "element": "script",
      "id": "config",
      "required": false,
      "selector": "script[data-fn=\"config\"][type=\"application/json\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the select as the data source (value: `data-source`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "data-source"
          ]
        },
        {
          "description": "Re-parses the options when the select mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "children": [
        {
          "attributes": [
            {
              "description": "Group header text; also the default group key.",
              "name": "label",
              "required": true,
              "type": "string"
            },
            {
              "description": "Disables every option in the group.",
              "name": "disabled",
              "required": false,
              "type": "boolean"
            },
            {
              "description": "Overrides the group key used in the parsed data.",
              "name": "data-key",
              "required": false,
              "type": "string"
            },
            {
              "description": "Comma-separated keywords stored with the group's data.",
              "name": "data-keywords",
              "required": false,
              "type": "comma-separated string"
            }
          ],
          "children": [
            {
              "attributes": [
                {
                  "description": "Value carried by this option in the parsed data.",
                  "name": "value",
                  "required": false,
                  "type": "string"
                },
                {
                  "description": "Makes the option non-selectable.",
                  "name": "disabled",
                  "required": false,
                  "type": "boolean"
                },
                {
                  "description": "Marks the option as initially selected.",
                  "name": "selected",
                  "required": false,
                  "type": "boolean"
                },
                {
                  "description": "Extra search terms, comma-separated; searched alongside the label and value.",
                  "name": "data-keywords",
                  "required": false,
                  "type": "comma-separated string"
                }
              ],
              "description": "One option entry within the group.",
              "element": "option",
              "repeatable": true
            }
          ],
          "description": "Groups options under a label.",
          "element": "optgroup",
          "repeatable": true
        },
        {
          "attributes": [
            {
              "description": "Value carried by this option in the parsed data.",
              "name": "value",
              "required": false,
              "type": "string"
            },
            {
              "description": "Makes the option non-selectable.",
              "name": "disabled",
              "required": false,
              "type": "boolean"
            },
            {
              "description": "Marks the option as initially selected.",
              "name": "selected",
              "required": false,
              "type": "boolean"
            },
            {
              "description": "Extra search terms, comma-separated.",
              "name": "data-keywords",
              "required": false,
              "type": "comma-separated string"
            }
          ],
          "description": "One ungrouped option entry.",
          "element": "option",
          "repeatable": true
        }
      ],
      "description": "Hidden select parsed into grouped option data by the base class.",
      "element": "select",
      "id": "data-source",
      "required": false,
      "selector": "select[data-fn=\"data-source\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the template as an icon source (value: `icons`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "icons"
          ]
        },
        {
          "description": "Re-parses the icons when the template mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "children": [
        {
          "attributes": [
            {
              "description": "Icon key referenced by `$icons`.",
              "name": "data-key",
              "required": true,
              "type": "string"
            }
          ],
          "description": "One icon element.",
          "element": "*",
          "repeatable": true
        }
      ],
      "description": "Instance-level icon repository.",
      "element": "template",
      "id": "icons",
      "required": false,
      "selector": "template[data-fn=\"icons\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the template for deferred mounting (value: `template`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "template"
          ]
        },
        {
          "description": "Re-parses the template when it mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "description": "Deferred content template mounted by the base class.",
      "element": "template",
      "id": "template",
      "required": false,
      "selector": "template[data-fn=\"template\"]"
    }
  ],
  "cssClasses": [],
  "cssVars": [],
  "dataHooks": [
    {
      "appliesTo": "descendant",
      "attribute": "data-chart-container",
      "description": "Marks the element ApexCharts renders into.",
      "role": "marker",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-error",
      "description": "Set when initialization or updates fail.",
      "role": "marker",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-host-inner",
      "description": "Marks the rendered inner wrapper so `force-prevent-rerender` can adopt server-rendered DOM without re-rendering.",
      "from": "Hwc",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-loading",
      "description": "Set while the chart is loading.",
      "role": "marker",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-reactive",
      "description": "Opts the marked child (config script, data source, icons, or template) into live re-parsing when its DOM mutates.",
      "from": "Hwc",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-rendered",
      "description": "Set after the chart has rendered.",
      "role": "marker",
      "values": []
    }
  ],
  "events": [],
  "i18n": [
    {
      "default": "Chart",
      "description": "Accessible label of the chart region.",
      "key": "chart-label",
      "placeholders": [],
      "usedIn": [
        "host-inner"
      ]
    },
    {
      "default": "Failed to load chart. Please try again.",
      "description": "Error announcement text.",
      "key": "error-message",
      "placeholders": [],
      "usedIn": [
        "error",
        "loading"
      ]
    },
    {
      "default": "Loading chart...",
      "description": "Loading announcement text.",
      "key": "loading-message",
      "placeholders": [],
      "usedIn": [
        "error",
        "loading"
      ]
    },
    {
      "default": "No data available",
      "description": "Text shown when there is no data.",
      "key": "no-data-message",
      "placeholders": [],
      "usedIn": [
        "error",
        "loading"
      ]
    }
  ],
  "icons": [],
  "id": "chart",
  "inherits": [
    "Hwc",
    "Base"
  ],
  "keyboard": [],
  "kind": "hwc",
  "methods": [
    {
      "description": "Returns the underlying ApexCharts instance (or null).",
      "name": "getChartInstance",
      "params": [],
      "returns": "ApexCharts | null",
      "static": false
    },
    {
      "description": "Calls ApexCharts `updateOptions` with the given options, redraw paths, and animation flags.",
      "name": "updateChart",
      "params": [
        {
          "default": null,
          "name": "options",
          "optional": false,
          "type": "object"
        },
        {
          "default": "true",
          "name": "redrawPaths",
          "optional": true,
          "type": "boolean"
        },
        {
          "default": "true",
          "name": "animate",
          "optional": true,
          "type": "boolean"
        }
      ],
      "returns": "Promise<void>",
      "static": false
    },
    {
      "description": "Calls ApexCharts `updateSeries` with new series data and an animation flag.",
      "name": "updateSeries",
      "params": [
        {
          "default": null,
          "name": "newSeries",
          "optional": false,
          "type": "ApexAxisChartSeries | ApexNonAxisChartSeries"
        },
        {
          "default": "true",
          "name": "animate",
          "optional": true,
          "type": "boolean"
        }
      ],
      "returns": "Promise<void>",
      "static": false
    }
  ],
  "notes": [
    "Configuration comes from the shared config script under the `apexCharts` key; changing it live updates the chart.",
    "ApexCharts is an optional dependency loaded by the chart pack; without a valid config the error state shows.",
    "There is no kit CSS layer for charts — style via ApexCharts options or the `chart` part."
  ],
  "parts": {
    "defaultClsTarget": "host-inner",
    "defaultStlTarget": "host-inner",
    "items": [
      {
        "defaultCls": "z-chart",
        "description": "The chart container (default `z-chart`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "chart",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "sr-only",
        "description": "Error announcement region (default `sr-only`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "error",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "",
        "description": "Rendered root wrapper; the default `cls`/`stl` target.",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "host-inner",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "sr-only",
        "description": "Loading announcement region (default `sr-only`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "loading",
        "supportsCls": true,
        "supportsStl": true
      }
    ]
  },
  "recipes": [],
  "related": [],
  "schemaVersion": 1,
  "sources": {
    "css": [],
    "cssSelectors": [],
    "ts": "src/js/hwc/components/chart.ts"
  },
  "summary": "ApexCharts wrapper configured through a JSON config script, with loading/error states and live option/series updates.",
  "tag": "z-chart",
  "title": "Chart"
}
