@pioneer-code/pioneer-charts 19.0.0 → 20.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/pioneer-code-pioneer-charts.mjs +169 -205
- package/fesm2022/pioneer-code-pioneer-charts.mjs.map +1 -1
- package/index.d.ts +363 -3
- package/package.json +3 -3
- package/scss/bar-chart/bar-vertical-chart/bar-vertical-chart.component.scss +0 -2
- package/scss/line-area-chart/line-area-chart.component.scss +3 -3
- package/scss/pioneer-charts.scss +4 -4
- package/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.builder.d.ts +0 -41
- package/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.component.d.ts +0 -21
- package/lib/bar-chart/bar-horizontal-chart/bar-horizontal-chart.model.d.ts +0 -15
- package/lib/bar-chart/bar-horizontal-chart/public-api.d.ts +0 -3
- package/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.builder.d.ts +0 -42
- package/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.component.d.ts +0 -21
- package/lib/bar-chart/bar-vertical-chart/bar-vertical-chart.model.d.ts +0 -15
- package/lib/bar-chart/bar-vertical-chart/public-api.d.ts +0 -3
- package/lib/core/axis.builder.d.ts +0 -21
- package/lib/core/chart.d.ts +0 -55
- package/lib/core/chart.model.d.ts +0 -24
- package/lib/core/color.service.d.ts +0 -32
- package/lib/core/grid.builder.d.ts +0 -22
- package/lib/core/index.d.ts +0 -1
- package/lib/core/public-api.d.ts +0 -7
- package/lib/core/tooltip.builder.d.ts +0 -10
- package/lib/core/transition.service.d.ts +0 -7
- package/lib/line-area-chart/line-area-chart-effects.builders.d.ts +0 -28
- package/lib/line-area-chart/line-area-chart.builder.d.ts +0 -37
- package/lib/line-area-chart/line-area-chart.component.d.ts +0 -21
- package/lib/line-area-chart/line-area-chart.model.d.ts +0 -14
- package/lib/line-area-chart/public-api.d.ts +0 -3
- package/lib/pie-chart/pie-chart.builder.d.ts +0 -33
- package/lib/pie-chart/pie-chart.component.d.ts +0 -21
- package/lib/pie-chart/pie-chart.model.d.ts +0 -4
- package/lib/pie-chart/public-api.d.ts +0 -3
- package/public-api.d.ts +0 -5
package/lib/core/chart.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { BaseType, Selection } from 'd3-selection';
|
|
2
|
-
import { PcacAxisBuilder } from './axis.builder';
|
|
3
|
-
import { PcacGridBuilder } from './grid.builder';
|
|
4
|
-
import { PcacChartConfig } from './chart.model';
|
|
5
|
-
import { PcacColorService } from './color.service';
|
|
6
|
-
import { ElementRef } from '@angular/core';
|
|
7
|
-
import { PcacData } from '.';
|
|
8
|
-
import { PcacTransitionService } from './transition.service';
|
|
9
|
-
import { PcacTooltipBuilder } from './tooltip.builder';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
export declare class PcacChart {
|
|
12
|
-
axisBuilder: PcacAxisBuilder;
|
|
13
|
-
gridBuilder: PcacGridBuilder;
|
|
14
|
-
transitionService: PcacTransitionService;
|
|
15
|
-
tooltipBuilder: PcacTooltipBuilder;
|
|
16
|
-
colorService: PcacColorService;
|
|
17
|
-
margin: {
|
|
18
|
-
top: number;
|
|
19
|
-
right: number;
|
|
20
|
-
bottom: number;
|
|
21
|
-
left: number;
|
|
22
|
-
};
|
|
23
|
-
svg: Selection<BaseType, {}, HTMLElement, any> | any;
|
|
24
|
-
width: number;
|
|
25
|
-
height: number;
|
|
26
|
-
colors: string[];
|
|
27
|
-
startData: any[];
|
|
28
|
-
endData: any[];
|
|
29
|
-
constructor(axisBuilder: PcacAxisBuilder, gridBuilder: PcacGridBuilder, transitionService: PcacTransitionService, tooltipBuilder: PcacTooltipBuilder, colorService: PcacColorService);
|
|
30
|
-
/**
|
|
31
|
-
* Prior to building a chart, we need to initialize the state of the chart
|
|
32
|
-
* @param chartElm Reference to SVG on dom
|
|
33
|
-
* @param config Chart specific configuration
|
|
34
|
-
*/
|
|
35
|
-
initializeChartState(chartElm: ElementRef, config: PcacChartConfig): void;
|
|
36
|
-
/**
|
|
37
|
-
* 1) Set the width and height of the SVG
|
|
38
|
-
* 2) Add a group and translate it to state of {{center}} option
|
|
39
|
-
* @param chartElm Reference to SVG on dom
|
|
40
|
-
* @param center Are we pinning x,y to the top,left, or are we centering our drawing group inside the SVG.
|
|
41
|
-
*/
|
|
42
|
-
buildContainer(chartElm: ElementRef, center?: boolean): void;
|
|
43
|
-
/**
|
|
44
|
-
* Most charts share a default margin(s) state.
|
|
45
|
-
* In some cases, that state needs to be calculated based on the content that resides in that margin.
|
|
46
|
-
* For example, labels on a horizontal bar chart are dynamic and such the margin needs to be calculated ahead of
|
|
47
|
-
* chart axis construction.
|
|
48
|
-
* @param chartElm Reference to SVG on dom
|
|
49
|
-
* @param data Generic multi-dimensional PcacData structure
|
|
50
|
-
* @param yScale D3 scale transformation object (d3.ScaleBand)
|
|
51
|
-
*/
|
|
52
|
-
setHorizontalMarginsBasedOnContent(chartElm: ElementRef, data: PcacData[], yScale: any): void;
|
|
53
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacChart, never>;
|
|
54
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PcacChart>;
|
|
55
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base configuration for all charts.
|
|
3
|
-
* INewChart extends IChart
|
|
4
|
-
*/
|
|
5
|
-
export declare class PcacChartConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Height in pixels
|
|
8
|
-
*/
|
|
9
|
-
height: number;
|
|
10
|
-
data: PcacData[];
|
|
11
|
-
}
|
|
12
|
-
export declare class PcacData {
|
|
13
|
-
key: string | number | null;
|
|
14
|
-
value: string | number | null;
|
|
15
|
-
hide: boolean;
|
|
16
|
-
data: PcacData[];
|
|
17
|
-
}
|
|
18
|
-
export declare enum PcacFormatEnum {
|
|
19
|
-
None = "none",
|
|
20
|
-
Percentage = "percentage",
|
|
21
|
-
Minutes = "minutes",
|
|
22
|
-
DateTime = "dateTime",
|
|
23
|
-
Fahrenheit = "fahrenheit"
|
|
24
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class PcacColorService {
|
|
3
|
-
private primary;
|
|
4
|
-
private primaryLight;
|
|
5
|
-
private success;
|
|
6
|
-
private danger;
|
|
7
|
-
private warning;
|
|
8
|
-
private orange;
|
|
9
|
-
private blue;
|
|
10
|
-
private scale;
|
|
11
|
-
private alert;
|
|
12
|
-
/**
|
|
13
|
-
* Get a scale of colors dynamically
|
|
14
|
-
* @param numberOfNodes Number of items in dynamically build collection of colors
|
|
15
|
-
*/
|
|
16
|
-
getColorScale(numberOfNodes: number): string[];
|
|
17
|
-
getAlert(): string;
|
|
18
|
-
/**
|
|
19
|
-
* Set the scale that charts use to set colors of data[x] on the UI.
|
|
20
|
-
* @param colors A collection of hex values
|
|
21
|
-
*/
|
|
22
|
-
setScale(colors: string[]): void;
|
|
23
|
-
setPrimary(color: string): void;
|
|
24
|
-
setPrimaryLight(color: string): void;
|
|
25
|
-
setSuccess(color: string): void;
|
|
26
|
-
setDanger(color: string): void;
|
|
27
|
-
setOrange(color: string): void;
|
|
28
|
-
setBlue(color: string): void;
|
|
29
|
-
setAlert(): string;
|
|
30
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacColorService, never>;
|
|
31
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PcacColorService>;
|
|
32
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BaseType, Selection } from 'd3-selection';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export interface IPcacGridBuilderConfig {
|
|
4
|
-
svg: Selection<BaseType, {}, HTMLElement, any>;
|
|
5
|
-
/**
|
|
6
|
-
* Required for horizontal grid
|
|
7
|
-
*/
|
|
8
|
-
width: number;
|
|
9
|
-
/**
|
|
10
|
-
* Required for vertical grid
|
|
11
|
-
*/
|
|
12
|
-
height: number;
|
|
13
|
-
xScale: any;
|
|
14
|
-
yScale: any;
|
|
15
|
-
numberOfTicks: number;
|
|
16
|
-
}
|
|
17
|
-
export declare class PcacGridBuilder {
|
|
18
|
-
drawVerticalGrid(config: IPcacGridBuilderConfig): void;
|
|
19
|
-
drawHorizontalGrid(config: IPcacGridBuilderConfig): void;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacGridBuilder, never>;
|
|
21
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PcacGridBuilder>;
|
|
22
|
-
}
|
package/lib/core/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public-api';
|
package/lib/core/public-api.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PcacData, PcacFormatEnum } from './chart.model';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class PcacTooltipBuilder {
|
|
4
|
-
tooltip: any;
|
|
5
|
-
showBarTooltip(event: MouseEvent, data: PcacData, valueFormat?: PcacFormatEnum, keyFormat?: PcacFormatEnum): void;
|
|
6
|
-
hideTooltip(): void;
|
|
7
|
-
private getBarTipData;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacTooltipBuilder, never>;
|
|
9
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PcacTooltipBuilder>;
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class PcacTransitionService {
|
|
3
|
-
private transitionDuration;
|
|
4
|
-
getTransitionDuration(): number;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacTransitionService, never>;
|
|
6
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PcacTransitionService>;
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Selection, BaseType } from 'd3-selection';
|
|
2
|
-
import { ScaleLinear } from 'd3-scale';
|
|
3
|
-
import { PcacData } from '../core';
|
|
4
|
-
import { ScaleTime } from 'd3';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export interface ILineAreaChartEffectsBuilderConfig {
|
|
7
|
-
colors: string[];
|
|
8
|
-
data: PcacData[];
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
svg: Selection<BaseType, {}, HTMLElement, any>;
|
|
12
|
-
x: ScaleLinear<number, number> | ScaleTime<number, number, never>;
|
|
13
|
-
y: ScaleLinear<number, number> | ScaleTime<number, number, never>;
|
|
14
|
-
}
|
|
15
|
-
export declare class LineAreaChartEffectsBuilder {
|
|
16
|
-
private config;
|
|
17
|
-
private lines;
|
|
18
|
-
buildEffects(config: ILineAreaChartEffectsBuilderConfig): void;
|
|
19
|
-
private buildCollection;
|
|
20
|
-
private buildCanvas;
|
|
21
|
-
private showEffects;
|
|
22
|
-
private hideEffects;
|
|
23
|
-
private onMouseMove;
|
|
24
|
-
private updateLine;
|
|
25
|
-
private updateEffects;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LineAreaChartEffectsBuilder, never>;
|
|
27
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LineAreaChartEffectsBuilder>;
|
|
28
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { PcacLineAreaChartConfig } from './line-area-chart.model';
|
|
3
|
-
import { PcacAxisBuilder } from '../core/axis.builder';
|
|
4
|
-
import { PcacGridBuilder } from '../core/grid.builder';
|
|
5
|
-
import { PcacTransitionService } from '../core/transition.service';
|
|
6
|
-
import { PcacTooltipBuilder } from '../core/tooltip.builder';
|
|
7
|
-
import { PcacColorService } from '../core/color.service';
|
|
8
|
-
import { PcacChart } from '../core/chart';
|
|
9
|
-
import { PcacData } from '../core/chart.model';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
export declare class LineAreaChartBuilder extends PcacChart {
|
|
12
|
-
axisBuilder: PcacAxisBuilder;
|
|
13
|
-
gridBuilder: PcacGridBuilder;
|
|
14
|
-
transitionService: PcacTransitionService;
|
|
15
|
-
tooltipBuilder: PcacTooltipBuilder;
|
|
16
|
-
colorService: PcacColorService;
|
|
17
|
-
private line;
|
|
18
|
-
private area;
|
|
19
|
-
private xScale;
|
|
20
|
-
private yScale;
|
|
21
|
-
private dotClickedSource;
|
|
22
|
-
private config;
|
|
23
|
-
dotClicked$: import("rxjs").Observable<PcacData>;
|
|
24
|
-
constructor(axisBuilder: PcacAxisBuilder, gridBuilder: PcacGridBuilder, transitionService: PcacTransitionService, tooltipBuilder: PcacTooltipBuilder, colorService: PcacColorService);
|
|
25
|
-
buildChart(chartElm: ElementRef, config: PcacLineAreaChartConfig): void;
|
|
26
|
-
private adjustForHiddenAxis;
|
|
27
|
-
private buildScales;
|
|
28
|
-
private drawChart;
|
|
29
|
-
private drawLineArea;
|
|
30
|
-
private drawLine;
|
|
31
|
-
private drawArea;
|
|
32
|
-
private drawEffects;
|
|
33
|
-
private drawDots;
|
|
34
|
-
private getXFormat;
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LineAreaChartBuilder, never>;
|
|
36
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LineAreaChartBuilder>;
|
|
37
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { PcacLineAreaChartConfig } from './line-area-chart.model';
|
|
3
|
-
import { LineAreaChartBuilder } from './line-area-chart.builder';
|
|
4
|
-
import { PcacData } from '../core';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class PcacLineAreaChartComponent {
|
|
7
|
-
private chartBuilder;
|
|
8
|
-
config: PcacLineAreaChartConfig;
|
|
9
|
-
chartElm: ElementRef;
|
|
10
|
-
dotClicked: EventEmitter<PcacData>;
|
|
11
|
-
private resizeWindowTimeout;
|
|
12
|
-
constructor(chartBuilder: LineAreaChartBuilder);
|
|
13
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
14
|
-
buildChart(): void;
|
|
15
|
-
/**
|
|
16
|
-
* Opting against fromEvent due to incompatibility with rxjs 5 => 6
|
|
17
|
-
*/
|
|
18
|
-
onResize(): void;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacLineAreaChartComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PcacLineAreaChartComponent, "pcac-line-area-chart", never, { "config": { "alias": "config"; "required": false; }; }, { "dotClicked": "dotClicked"; }, never, never, true, never>;
|
|
21
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PcacChartConfig, PcacFormatEnum } from '../core/chart.model';
|
|
2
|
-
export declare class PcacLineAreaChartConfig extends PcacChartConfig {
|
|
3
|
-
isArea: boolean;
|
|
4
|
-
enableEffects: boolean;
|
|
5
|
-
numberOfTicks: number;
|
|
6
|
-
hideGrid: boolean;
|
|
7
|
-
hideAxis: boolean;
|
|
8
|
-
yFormat: PcacFormatEnum;
|
|
9
|
-
xFormat: PcacFormatEnum;
|
|
10
|
-
yDomainMax: number | string;
|
|
11
|
-
yDomainMin: number | string;
|
|
12
|
-
xDomainMin: number | string;
|
|
13
|
-
xDomainMax: number | string;
|
|
14
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Lib
|
|
4
|
-
*/
|
|
5
|
-
import { PcacPieChartConfig } from './pie-chart.model';
|
|
6
|
-
import { PcacAxisBuilder } from '../core/axis.builder';
|
|
7
|
-
import { PcacGridBuilder } from '../core/grid.builder';
|
|
8
|
-
import { PcacTransitionService } from '../core/transition.service';
|
|
9
|
-
import { PcacTooltipBuilder } from '../core/tooltip.builder';
|
|
10
|
-
import { PcacColorService } from '../core/color.service';
|
|
11
|
-
import { PcacChart } from '../core/chart';
|
|
12
|
-
import { PcacData } from '../core/chart.model';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
export declare class PieChartBuilder extends PcacChart {
|
|
15
|
-
axisBuilder: PcacAxisBuilder;
|
|
16
|
-
gridBuilder: PcacGridBuilder;
|
|
17
|
-
transitionService: PcacTransitionService;
|
|
18
|
-
tooltipBuilder: PcacTooltipBuilder;
|
|
19
|
-
colorService: PcacColorService;
|
|
20
|
-
private radius;
|
|
21
|
-
private arcShape;
|
|
22
|
-
private arcOverShape;
|
|
23
|
-
private pieAngles;
|
|
24
|
-
private sliceClickedSource;
|
|
25
|
-
sliceClicked$: import("rxjs").Observable<PcacData>;
|
|
26
|
-
constructor(axisBuilder: PcacAxisBuilder, gridBuilder: PcacGridBuilder, transitionService: PcacTransitionService, tooltipBuilder: PcacTooltipBuilder, colorService: PcacColorService);
|
|
27
|
-
buildChart(chartElm: ElementRef, config: PcacPieChartConfig): void;
|
|
28
|
-
private buildShapes;
|
|
29
|
-
private drawChart;
|
|
30
|
-
private tweenChart;
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PieChartBuilder, never>;
|
|
32
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PieChartBuilder>;
|
|
33
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnChanges, EventEmitter } from '@angular/core';
|
|
2
|
-
import { PcacPieChartConfig } from './pie-chart.model';
|
|
3
|
-
import { PieChartBuilder } from './pie-chart.builder';
|
|
4
|
-
import { PcacData } from '../core';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class PcacPieChartComponent implements OnChanges {
|
|
7
|
-
private chartBuilder;
|
|
8
|
-
config: PcacPieChartConfig;
|
|
9
|
-
chartElm: ElementRef;
|
|
10
|
-
sliceClicked: EventEmitter<PcacData>;
|
|
11
|
-
private resizeWindowTimeout;
|
|
12
|
-
constructor(chartBuilder: PieChartBuilder);
|
|
13
|
-
ngOnChanges(): void;
|
|
14
|
-
buildChart(): void;
|
|
15
|
-
/**
|
|
16
|
-
* Opting against fromEvent due to incompatibility with rxjs 5 => 6
|
|
17
|
-
*/
|
|
18
|
-
onResize(): void;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PcacPieChartComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PcacPieChartComponent, "pcac-pie-chart", never, { "config": { "alias": "config"; "required": false; }; }, { "sliceClicked": "sliceClicked"; }, never, never, true, never>;
|
|
21
|
-
}
|
package/public-api.d.ts
DELETED