Skip to main content
cngx-src documentation

CngxChartLoading

Directivev0.1.0

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

Import#

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

Description#

Per-instance loading slot for <cngx-chart>. Project an <ng-template cngxChartLoading> to override the default centred spinner. The template receives a CngxChartSlotContext with the chart's rendered width/height plus a small flag for container-size-aware branching.

<cngx-chart [state]="state()">
  <ng-template cngxChartLoading let-small="small">
    @if (small) { <my-mini-spinner /> }
    @else { <my-branded-spinner /> }
  </ng-template>
</cngx-chart>

Metadata#

Dependencies#

TemplateRefinject()templateRef