Skip to content
angulux
@anguless/angulux/chart

Chart

1 declaration2 demoschart.md
import
import { ChartModule } from '@anguless/angulux/chart';

Basic

Chart wraps Chart.js: type, data and options are passed straight through.

<agl-chart type="bar" ariaLabel="Sales and returns by quarter" [data]="data" [options]="options" [style]="{ width: '32rem', maxWidth: '100%' }" />

Doughnut

The same component draws every Chart.js type.

<agl-chart type="doughnut" ariaLabel="Share by category" [data]="data" [options]="options" [style]="{ width: '18rem' }" />

API

Generated from the committed corpus, which check:corpus holds to the built library.

UIChart

componentagl-chart

Chart groups a collection of contents in tabs.

InputTypeDefaultDescription
type'bar' | 'line' | 'scatter' | 'bubble' | 'pie' | 'doughnut' | 'polarArea' | 'radar' | undefinednot documentedType of the chart.
pluginsany[]not documentedArray of per-chart plugins to customize the chart behaviour.
widthstring | undefinednot documentedWidth of the chart.
heightstring | undefinednot documentedHeight of the chart.
responsivebooleannot documentedWhether the chart is redrawn on screen size change.
ariaLabelstring | undefinednot documentedUsed to define a string that autocomplete attribute the current element.
ariaLabelledBystring | undefinednot documentedEstablishes relationships between the component and label(s) where its value should be one or more element IDs.
dataanynot documentedData to display.
optionsanynot documentedOptions to customize the chart.
OutputTypeDescription
onDataSelectEventEmitter<any>Callback to execute when an element on chart is clicked. Accessibility, a known limit: the chart is drawn on a canvas, and a data point can be chosen with the pointer only (WCAG 2.1.1). Where choosing one matters, offer the same choice outside the chart too, for example a table of the data with a button in each row.

Inherited from BaseComponent

inherited
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | undefined undefined Used to pass attributes to DOM elements inside the component. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.