Skip to main content
cngx-src documentation

CngxChartEmpty

Directivev0.1.0

projects/common/chart/chart/template-slots.ts

Import#

import { CngxChartEmpty } from '@cngx/common/chart'

Description#

Per-instance empty slot for <cngx-chart>. Receives a CngxChartSlotContext so the consumer can branch on chart size - typically a compact text fallback when small is true and a richer surface (<cngx-empty-state>, illustration, action) at regular sizes.

<cngx-chart [state]="state()">
  <ng-template cngxChartEmpty let-small="small" let-plot="plot">
    <span>No readings in this range ({{ plot.width }} wide)</span>
  </ng-template>
</cngx-chart>

Metadata#

Dependencies#

TemplateRefinject()templateRef