ng-chartist
Advanced tools
Comparing version 6.8.1 to 7.0.0
import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core"; | ||
import * as Chartist from "chartist"; | ||
import { BarChart, BarChartData, BarChartOptions, LineChart, LineChartData, LineChartOptions, PieChart, PieChartData, PieChartOptions, ResponsiveOptions } from "chartist"; | ||
import * as i0 from "@angular/core"; | ||
declare type ChartTypes = BarChart | LineChart | PieChart; | ||
export interface BarChartConfiguration { | ||
type: "Bar"; | ||
data: BarChartData; | ||
options?: BarChartOptions; | ||
responsiveOptions?: ResponsiveOptions<BarChartOptions>; | ||
} | ||
export interface LineChartConfiguration { | ||
type: "Line"; | ||
data: LineChartData; | ||
options?: LineChartOptions; | ||
responsiveOptions?: ResponsiveOptions<LineChartOptions>; | ||
} | ||
export interface PieChartConfiguration { | ||
type: "Pie"; | ||
data: PieChartData; | ||
options?: PieChartOptions; | ||
responsiveOptions?: ResponsiveOptions<PieChartOptions>; | ||
} | ||
export declare type Configuration = BarChartConfiguration | LineChartConfiguration | PieChartConfiguration; | ||
/** | ||
* Possible chart types | ||
*/ | ||
export declare type ChartType = "Pie" | "Bar" | "Line"; | ||
export declare type ChartInterfaces = Chartist.IChartistPieChart | Chartist.IChartistBarChart | Chartist.IChartistLineChart; | ||
export declare type ChartOptions = Chartist.IBarChartOptions | Chartist.ILineChartOptions | Chartist.IPieChartOptions; | ||
export declare type ResponsiveOptionTuple = Chartist.IResponsiveOptionTuple<ChartOptions>; | ||
export declare type ResponsiveOptions = ResponsiveOptionTuple[]; | ||
/** | ||
* Represents chart events. | ||
*/ | ||
export interface ChartEvent { | ||
[eventName: string]: (data: any) => void; | ||
[eventName: string]: (data: unknown) => void; | ||
} | ||
@@ -26,6 +38,3 @@ /** | ||
<x-chartist | ||
[type]="type" | ||
[data]="data" | ||
[options]="options" | ||
[responsiveOptions]="responsiveOptions" | ||
[configuration]="configuration" | ||
[events]="events" | ||
@@ -37,19 +46,4 @@ ></x-chartist> | ||
private elementRef; | ||
configuration: Configuration; | ||
/** | ||
* The data object that needs to consist of a labels and a series array. | ||
*/ | ||
data: Chartist.IChartistData; | ||
/** | ||
* Chartist chart type. | ||
*/ | ||
type: ChartType; | ||
/** | ||
* The options object which overrides the default options. | ||
*/ | ||
options: Chartist.IChartOptions; | ||
/** | ||
* An array of responsive option arrays which are a media query and options object pair: [[mediaQueryString, optionsObject],[more...]] | ||
*/ | ||
responsiveOptions: ResponsiveOptions; | ||
/** | ||
* Events object where keys are Chartist event names and values are event handler functions. | ||
@@ -67,4 +61,4 @@ * | ||
*/ | ||
initialized: EventEmitter<ChartInterfaces>; | ||
chart: ChartInterfaces; | ||
initialized: EventEmitter<ChartTypes>; | ||
chart: ChartTypes; | ||
constructor(elementRef: ElementRef); | ||
@@ -78,3 +72,4 @@ ngOnInit(): void; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<ChartistComponent, never>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<ChartistComponent, "x-chartist", never, { "data": "data"; "type": "type"; "options": "options"; "responsiveOptions": "responsiveOptions"; "events": "events"; }, { "initialized": "initialized"; }, never, never, false>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<ChartistComponent, "x-chartist", never, { "configuration": "configuration"; "events": "events"; }, { "initialized": "initialized"; }, never, never, false>; | ||
} | ||
export {}; |
{ | ||
"name": "ng-chartist", | ||
"version": "6.8.1", | ||
"version": "7.0.0", | ||
"description": "Chartist component for Angular", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"@angular/core": "^12.0.0 || ^13.0.0 || ^14.0.0", | ||
"chartist": "^0.11.4" | ||
"chartist": "^1.0.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "module": "fesm2015/ng-chartist.mjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
48455
431