@kiwibit/chart 19.0.0 → 20.0.1

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Directive, Input, Output, HostListener, Component } from '@angular/core';
2
+ import { EventEmitter, HostListener, Input, Output, Directive, Component } from '@angular/core';
3
3
  import * as echarts from 'echarts/core';
4
4
  import { TitleComponent, TooltipComponent, GridComponent, LegendComponent, DataZoomComponent, ToolboxComponent } from 'echarts/components';
5
5
  import { LineChart, ScatterChart } from 'echarts/charts';
@@ -451,10 +451,10 @@ class KiwiChartDirective {
451
451
  }
452
452
  });
453
453
  }
454
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: KiwiChartDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
455
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.3", type: KiwiChartDirective, isStandalone: true, selector: "div[kiwi-chart]", inputs: { chart: "chart", width: "width", height: "height", darkTheme: "darkTheme", darkThemeBackground: "darkThemeBackground" }, outputs: { chartInit: "chartInit", addPoint: "addPoint", chartHover: "chartHover" }, host: { listeners: { "window:resize": "onResize($event)" } }, usesOnChanges: true, ngImport: i0 }); }
454
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KiwiChartDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
455
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: KiwiChartDirective, isStandalone: true, selector: "div[kiwi-chart]", inputs: { chart: "chart", width: "width", height: "height", darkTheme: "darkTheme", darkThemeBackground: "darkThemeBackground" }, outputs: { chartInit: "chartInit", addPoint: "addPoint", chartHover: "chartHover" }, host: { listeners: { "window:resize": "onResize($event)" } }, usesOnChanges: true, ngImport: i0 }); }
456
456
  }
457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: KiwiChartDirective, decorators: [{
457
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KiwiChartDirective, decorators: [{
458
458
  type: Directive,
459
459
  args: [{
460
460
  selector: 'div[kiwi-chart]',
@@ -531,8 +531,8 @@ class KiwiChartComponent {
531
531
  */
532
532
  this.chartHover = new EventEmitter();
533
533
  }
534
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: KiwiChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
535
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: KiwiChartComponent, isStandalone: true, selector: "kiwi-chart", inputs: { chart: "chart", width: "width", height: "height", darkTheme: "darkTheme", darkThemeBackground: "darkThemeBackground" }, outputs: { addPoint: "addPoint", chartHover: "chartHover" }, ngImport: i0, template: `
534
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KiwiChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
535
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: KiwiChartComponent, isStandalone: true, selector: "kiwi-chart", inputs: { chart: "chart", width: "width", height: "height", darkTheme: "darkTheme", darkThemeBackground: "darkThemeBackground" }, outputs: { addPoint: "addPoint", chartHover: "chartHover" }, ngImport: i0, template: `
536
536
  <div
537
537
  kiwi-chart
538
538
  [chart]="chart"
@@ -545,7 +545,7 @@ class KiwiChartComponent {
545
545
  ></div>
546
546
  `, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: KiwiChartDirective, selector: "div[kiwi-chart]", inputs: ["chart", "width", "height", "darkTheme", "darkThemeBackground"], outputs: ["chartInit", "addPoint", "chartHover"] }] }); }
547
547
  }
548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: KiwiChartComponent, decorators: [{
548
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: KiwiChartComponent, decorators: [{
549
549
  type: Component,
550
550
  args: [{ selector: 'kiwi-chart', template: `
551
551
  <div
@@ -1 +1 @@
1
- {"version":3,"file":"kiwibit-chart.mjs","sources":["../../../../projects/kiwibit/chart/src/lib/models/chart.models.ts","../../../../projects/kiwibit/chart/src/lib/constants/chart.constants.ts","../../../../projects/kiwibit/chart/src/lib/directives/kiwi-chart.directive.ts","../../../../projects/kiwibit/chart/src/lib/components/chart.component.ts","../../../../projects/kiwibit/chart/src/public-api.ts","../../../../projects/kiwibit/chart/src/kiwibit-chart.ts"],"sourcesContent":["/**\r\n * Interface to define the Chart model.\r\n *\r\n * @export\r\n * @interface Chart\r\n */\r\nexport interface Chart {\r\n title: string;\r\n showLegend?: boolean;\r\n xAxisType: AxisType;\r\n xAxisName: string;\r\n xAxisUom?: string;\r\n xMin?: number;\r\n xMax?: number;\r\n yAxisType: AxisType;\r\n yAxisName: string;\r\n yAxisUom?: string;\r\n yMin?: number;\r\n yMax?: number;\r\n /**\r\n * The maximum decimals that can have the values on the x and y axes.\r\n * If omitted the default is 3 decimals.\r\n *\r\n * @type {number}\r\n * @memberof Chart\r\n */\r\n maxAxesDecimals?: number;\r\n /**\r\n * If the chart should have rendering animations.\r\n *\r\n * @type {boolean}\r\n * @memberof Chart\r\n */\r\n hasAnimations?: boolean;\r\n /**\r\n * How long the animation should last.\r\n * Expressed in milliseconds. If omitted the Default is 500 ms.\r\n *\r\n * @type {number}\r\n * @memberof Chart\r\n */\r\n animationDuration?: number;\r\n /**\r\n * The list of Shapes that the chart must render.\r\n * Each Shape corrisponds to a single chart component.\r\n *\r\n * @type {Shape[]}\r\n * @memberof Chart\r\n */\r\n shapes: Shape[];\r\n /**\r\n * Adds interaction with the chart, so that when clicking\r\n * everywhere in the chart area a point gets added and it's coordinate are \r\n * emitted with an event to the parent component.\r\n *\r\n * @type {boolean}\r\n * @memberof Chart\r\n */\r\n clickToAddPoint?: boolean;\r\n /**\r\n * Custom name for the \"clickToAddPoint\" event related button. \r\n *\r\n * @type {string}\r\n * @memberof Chart\r\n */\r\n addPointCustomName?: string;\r\n /**\r\n * Adds the possibility to use the scroll \r\n * to zoom in/out the chart area.\r\n *\r\n * @type {boolean}\r\n * @memberof Chart\r\n */\r\n scrollToZoom?: boolean;\r\n /**\r\n * Tells the chart to render or not the grid lines.\r\n *\r\n * @type {boolean}\r\n * @memberof Chart\r\n */\r\n showGrid?: boolean;\r\n}\r\n\r\nexport type Shape = Trace;\r\n\r\nexport interface Trace {\r\n name?: string;\r\n /**\r\n * The variant of the Shape, must be of type Trace.\r\n *\r\n * @type {ShapeVariant}\r\n * @memberof Trace\r\n */\r\n variant: ShapeVariant;\r\n color?: string;\r\n /**\r\n * The type of the Trace drawn by the chart.\r\n * Can be a line or a scatter. \r\n *\r\n * @type {TraceType}\r\n * @memberof Trace\r\n */\r\n type: TraceType;\r\n width?: number;\r\n /**\r\n * The list of points that define the Trace.\r\n *\r\n * @type {Point[]}\r\n * @memberof Trace\r\n */\r\n points: Point[];\r\n /**\r\n * Whether to show a smooth curve or a segmented curve.\r\n *\r\n * @type {boolean}\r\n * @memberof Trace\r\n */\r\n smooth?: boolean;\r\n /**\r\n * The style of the Trace.\r\n * Can be solid, dashed or dotted.\r\n *\r\n * @type {TraceStyle}\r\n * @memberof Trace\r\n */\r\n style?: TraceStyle;\r\n /**\r\n * Option to make the Trace selected/deselected by default.\r\n * A deselected Trace is obscured from the chart and can be toggled from the legend. \r\n *\r\n * @type {boolean}\r\n * @memberof Trace\r\n */\r\n selectedByDefault?: boolean;\r\n opacity?: number;\r\n}\r\n\r\nexport interface Point extends BasePoint {\r\n name?: string;\r\n /**\r\n * Symbol used to represent the point in the chart.\r\n *\r\n * @type {PointSymbol}\r\n * @memberof Point\r\n */\r\n symbol?: PointSymbol;\r\n symbolSize?: number;\r\n color?: string;\r\n}\r\n\r\nexport interface BasePoint {\r\n x: number;\r\n y: number\r\n}\r\n\r\nexport enum TraceType {\r\n LINE = \"line\",\r\n SCATTER = \"scatter\"\r\n}\r\n\r\nexport enum PointSymbol {\r\n NONE = \"none\",\r\n CIRCLE = \"circle\",\r\n TRIANGLE = \"triangle\",\r\n PIN = \"pin\",\r\n DIAMOND = \"diamond\"\r\n}\r\n\r\nexport enum TraceStyle {\r\n SOLID = \"solid\",\r\n DASHED = \"dashed\",\r\n DOTTED = \"dotted\"\r\n}\r\n\r\nexport enum AxisType {\r\n VALUE = \"value\"\r\n}\r\n\r\nexport enum ShapeVariant {\r\n TRACE\r\n}\r\n\r\nexport type ChartTheme = 'default' | 'dark';","export const ZOOM_IN: string = \"M39.35 40.45 26.6 27.7q-1.55 1.35-3.6 2.025-2.05.675-4 .675-4.9 0-8.225-3.325Q7.45 23.75 7.45 18.9q0-4.9 3.325-8.225Q14.1 7.35 18.95 7.35q4.85 0 8.225 3.325t3.375 8.175q0 2.1-.725 4.1-.725 2-2.025 3.45l12.8 12.75ZM19 28.65q4.15 0 6.975-2.8 2.825-2.8 2.825-7 0-4.15-2.825-6.95T19 9.1q-4.2 0-7 2.8t-2.8 6.95q0 4.2 2.8 7t7 2.8Zm-.9-5.1V19.7h-3.85v-1.75h3.85v-3.8h1.75v3.8h3.8v1.75h-3.8v3.85Z\";\r\nexport const ZOOM_OUT: string = \"M41.25 39.35 29.55 27.7q-1.5 1.25-3.525 1.975Q24 30.4 22.05 30.4q-2.1 0-3.975-.725T14.9 27.65l1.2-1.2q1.2 1.1 2.65 1.65 1.45.55 3.25.55 4.2 0 7-2.8t2.8-7q0-4.15-2.8-6.95t-7-2.8q-4.15 0-7 2.8-2.85 2.8-2.75 6.95l3.2-3.4 1.3 1.3-5.35 5.35-5.3-5.35 1.3-1.3 3.05 3.3q0-4.85 3.4-8.125Q17.25 7.35 22 7.35q4.9 0 8.225 3.325Q33.55 14 33.55 18.85q0 2.1-.75 4.1-.75 2-1.95 3.45L42.5 38.05Z\";\r\nexport const SAVE_AS_SVG: string = \"M11.3 40.05q-1.35 0-2.35-1t-1-2.35V11.3q0-1.4 1-2.375 1-.975 2.35-.975h25.4q1.4 0 2.375.975.975.975.975 2.375v25.4q0 1.35-.975 2.35t-2.375 1Zm0-1.75h25.4q.6 0 1.1-.5.5-.5.5-1.1V11.3q0-.6-.5-1.1-.5-.5-1.1-.5H11.3q-.6 0-1.1.5-.5.5-.5 1.1v25.4q0 .6.5 1.1.5.5 1.1.5Zm4.1-5.15h17.65l-5.5-7.3-5.2 6.45-3.3-3.85ZM9.7 38.3V9.7v28.6Z\";\r\nexport const RESTORE: string = \"M24.2 25.65q-.65 0-1.125-.475T22.6 24q0-.7.475-1.2t1.175-.5q.65 0 1.175.525T25.95 24q0 .7-.55 1.175-.55.475-1.2.475Zm.1 14.55q-6.4 0-11.1-4.25Q8.5 31.7 8.1 25.4h1.8q.5 5.55 4.6 9.3 4.1 3.75 9.75 3.75 6.05 0 10.225-4.225T38.65 24.05q0-6.05-4.2-10.275Q30.25 9.55 24.3 9.55q-3.2 0-6.025 1.3t-4.875 3.6h4.95v1.75H10.4v-8h1.75v5.05q2.25-2.6 5.475-4.025Q20.85 7.8 24.3 7.8q3.3 0 6.225 1.25t5.125 3.475q2.2 2.225 3.475 5.175Q40.4 20.65 40.4 24q0 3.35-1.275 6.3-1.275 2.95-3.475 5.175-2.2 2.225-5.125 3.475T24.3 40.2Z\";\r\nexport const ADD_POINT: string = \"M222.895-189.538q-22.456 0-37.906-15.451-15.451-15.45-15.451-37.906v-474.21q0-22.456 15.451-37.906 15.45-15.451 38.088-15.451h322.346v28.924H223.077q-10.769 0-17.692 6.923t-6.923 17.692v473.846q0 10.769 6.923 17.692t17.692 6.923h473.846q10.77 0 17.693-6.923 6.923-6.923 6.923-17.692v-322.346h28.923v322.346q0 22.638-15.451 38.088-15.45 15.451-37.906 15.451h-474.21Zm78.028-121.539h28.923v-243.077h-28.923v243.077Zm144.923 0h28.923v-337.846h-28.923v337.846Zm144.308 0h28.923v-148.308h-28.923v148.308Zm100-327.692v-71.385h-71.385v-28.923h71.385v-71.385h28.923v71.385h71.385v28.923h-71.385v71.385h-28.923ZM460-480Z\";\r\n","// Angular Imports\r\nimport { AfterViewInit, Directive, ElementRef, EventEmitter, HostListener, Input, OnChanges, Output, SimpleChanges } from '@angular/core';\r\n// Kiwi Chart Imports\r\nimport { BasePoint, Chart, Point, Shape, ShapeVariant, Trace } from '../models/chart.models';\r\nimport { ADD_POINT, RESTORE, SAVE_AS_SVG, ZOOM_IN, ZOOM_OUT } from '../constants/chart.constants';\r\n// Echarts Imports\r\nimport * as echarts from 'echarts/core';\r\nimport {\r\n ComposeOption,\r\n CustomSeriesOption,\r\n LegendComponentOption,\r\n LineSeriesOption,\r\n ScatterSeriesOption,\r\n ToolboxComponentOption\r\n} from 'echarts/types/dist/shared'; \r\nimport { TitleComponent, TooltipComponent, GridComponent, LegendComponent, DataZoomComponent, ToolboxComponent, TitleComponentOption, TooltipComponentOption, GridComponentOption, DatasetComponentOption } from 'echarts/components';\r\nimport { LineChart, ScatterChart } from 'echarts/charts';\r\nimport { CanvasRenderer } from 'echarts/renderers';\r\necharts.use([\r\n TitleComponent,\r\n TooltipComponent,\r\n GridComponent,\r\n LineChart,\r\n ScatterChart,\r\n CanvasRenderer,\r\n LegendComponent,\r\n DataZoomComponent,\r\n ToolboxComponent,\r\n]);\r\nexport type ECOption = ComposeOption<\r\n | LineSeriesOption\r\n | TitleComponentOption\r\n | TooltipComponentOption\r\n | GridComponentOption\r\n | DatasetComponentOption\r\n | LegendComponentOption\r\n | ToolboxComponentOption\r\n>;\r\n\r\n@Directive({\r\n selector: 'div[kiwi-chart]',\r\n standalone: true\r\n})\r\nexport class KiwiChartDirective implements OnChanges, AfterViewInit {\r\n\r\n /**\r\n * The Chart Object rendered by the canvas. For all the available options refer \r\n * to Chart interface in the models folder.\r\n *\r\n * @type {(Chart | null)}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Input({ required: true }) chart: Chart | null = null;\r\n\r\n /**\r\n * Width and Height of the chart area. The dimensions refer to the father component \r\n * into which the kiwi-chart is inserted. For example in an empty page the width/height \r\n * of the chart can take the whole available space in the page.\r\n *\r\n * @type {string}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Input() width: string = '100%';\r\n @Input() height: string = '480px';\r\n\r\n @Output() chartInit = new EventEmitter<echarts.ECharts>();\r\n\r\n /**\r\n * Output event used to emit to the father component the coordinates\r\n * of the point clicked in the chart area. This functionality to be used must\r\n * have the property \"clickToAddPoint\" in the Chart object set to true.\r\n *\r\n * @type {EventEmitter<BasePoint>}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Output() addPoint: EventEmitter<BasePoint> = new EventEmitter<BasePoint>();\r\n\r\n /**\r\n * When the cursor hovers the chart area it emits to the father component the\r\n * x and y coordinates relative to the chart reference system.\r\n *\r\n * @type {EventEmitter<BasePoint>}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Output() chartHover: EventEmitter<BasePoint> = new EventEmitter<BasePoint>();\r\n\r\n /**\r\n * This property simply activates or not the dark theme of the chart\r\n * defined by the Echarts library. In addition the background color can be custom\r\n * so that the chart can match the background of the application in which it's used.\r\n *\r\n * @type {boolean}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Input() darkTheme: boolean = false;\r\n @Input() darkThemeBackground: string | null = null;\r\n\r\n /**\r\n * The instance of the Chart.\r\n *\r\n * @type {ECharts}\r\n * @memberof KiwiChartDirective\r\n */\r\n echartsInstance: echarts.ECharts | null = null;\r\n\r\n /**\r\n * Default number of decimals that can have\r\n * the values on the x and y axes.\r\n *\r\n * @private\r\n * @type {number}\r\n * @memberof KiwiChartDirective\r\n */\r\n private readonly MAX_DECIMALS: number = 3;\r\n\r\n private legendSelected: { [key: string]: boolean } = {};\r\n private isLegendClicked: boolean = false;\r\n\r\n /**\r\n * Used to perform actions (as point addition based on the cursor position) on the chart.\r\n *\r\n * @type {(zrender.ZRenderType | null)}\r\n * @memberof KiwiChartComponent\r\n */\r\n zr: echarts.zrender.ZRenderType | null = null;\r\n\r\n /**\r\n * If you resize the page, the chart is automatically re-rendered wiht the right proportions.\r\n *\r\n * @memberof EnchartingDirective\r\n */\r\n @HostListener('window:resize', ['$event'])\r\n onResize() {\r\n if (this.echartsInstance) {\r\n this.echartsInstance.resize();\r\n }\r\n }\r\n\r\n constructor(\r\n private el: ElementRef<HTMLDivElement>\r\n ) { }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.chart) {\r\n this.renderChart(this.chart);\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n let chart: Chart = changes['chart']?.currentValue;\r\n if (this.echartsInstance) {\r\n // Every time we have an external change we\r\n // destroy the chart and re-initialize it\r\n this.echartsInstance.dispose();\r\n this.renderChart(chart);\r\n }\r\n }\r\n\r\n renderChart(chart: Chart): void {\r\n // Update ElementRef styles\r\n this.el.nativeElement.style.width = this.width;\r\n this.el.nativeElement.style.height = this.height;\r\n\r\n this.echartsInstance = echarts.init(\r\n this.el.nativeElement,\r\n this.darkTheme ? 'dark' : 'default',\r\n {\r\n renderer: 'svg'\r\n }\r\n );\r\n\r\n if (chart) {\r\n this.echartsInstance.setOption({\r\n title: {\r\n text: chart.title,\r\n },\r\n grid: {\r\n id: 0,\r\n width: '70%'\r\n },\r\n backgroundColor: this.darkTheme ? this.darkThemeBackground ?? '#303030' : 'transparent', tooltip: {\r\n axisPointer: {\r\n type: 'cross',\r\n crossStyle: {\r\n color: '#bebebe'\r\n }\r\n }\r\n },\r\n toolbox: {\r\n orient: 'horizontal',\r\n left: 'center',\r\n top: '25px',\r\n feature: {\r\n dataZoom: {\r\n brushStyle: {\r\n borderColor: '#000',\r\n borderWidth: 1,\r\n borderType: 'dashed'\r\n },\r\n emphasis: {\r\n iconStyle: {\r\n textPosition: 'top',\r\n textPadding: 5\r\n }\r\n },\r\n icon: {\r\n zoom: ZOOM_IN,\r\n back: ZOOM_OUT\r\n },\r\n },\r\n saveAsImage: {\r\n emphasis: {\r\n iconStyle: {\r\n textPosition: 'top',\r\n textPadding: 5\r\n }\r\n },\r\n icon: SAVE_AS_SVG,\r\n },\r\n restore: {\r\n emphasis: {\r\n iconStyle: {\r\n textPosition: 'top',\r\n textPadding: 5\r\n }\r\n },\r\n icon: RESTORE,\r\n },\r\n myAddPoint: {\r\n show: chart.clickToAddPoint ?? false,\r\n title: chart.addPointCustomName ?? 'Add Point',\r\n icon: ADD_POINT,\r\n onclick: () => {\r\n if (this.echartsInstance) {\r\n const option: ECOption = this.echartsInstance.getOption();\r\n const toolbox = option.toolbox as ToolboxComponentOption[];\r\n if (toolbox) {\r\n const status: boolean = toolbox[0].feature?.['myAddPoint']?.iconStatus;\r\n const offColor: string = 'rgb(102,102,102)';\r\n const highlightColor: string = 'rgb(62,152,197)';\r\n this.echartsInstance.setOption({\r\n toolbox: {\r\n feature: {\r\n myAddPoint: {\r\n iconStatus: !status,\r\n iconStyle: {\r\n borderColor: !status ? highlightColor : offColor\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n },\r\n emphasis: {\r\n iconStyle: {\r\n textPosition: 'top',\r\n textPadding: 5\r\n }\r\n }\r\n }\r\n },\r\n },\r\n dataZoom: [\r\n {\r\n type: 'inside',\r\n xAxisIndex: [0],\r\n throttle: 0,\r\n filterMode: 'none',\r\n disabled: !chart.scrollToZoom\r\n },\r\n {\r\n type: 'inside',\r\n yAxisIndex: [0],\r\n throttle: 0,\r\n filterMode: 'none',\r\n disabled: !chart.scrollToZoom\r\n },\r\n ],\r\n legend: {\r\n inactiveColor: this.darkTheme ? '#8b8b8b' : '#ccc',\r\n data: chart.shapes.map(\r\n (shape: Shape) => ({\r\n name: shape.name,\r\n icon: 'circle',\r\n })\r\n ),\r\n selected: chart.shapes.reduce(\r\n (accumulator, shape: Shape) => ({\r\n ...accumulator,\r\n [shape.name as string]: this.getLegendItemSelection(shape),\r\n }),\r\n {}),\r\n show: chart.showLegend ?? false,\r\n orient: 'vertical',\r\n left: 'right',\r\n padding: [60, 20],\r\n type: 'scroll',\r\n textStyle: {\r\n width: 120,\r\n fontWeight: 'bold',\r\n overflow: 'break'\r\n }\r\n },\r\n xAxis: {\r\n type: chart.xAxisType,\r\n name: chart.xAxisUom ? `${chart.xAxisName} [ ${chart.xAxisUom} ]` : chart.xAxisName,\r\n nameLocation: 'middle',\r\n nameGap: 30,\r\n splitLine: {\r\n show: chart.showGrid ?? true,\r\n lineStyle: {\r\n color: this.darkTheme ? '#595959' : '#ccc'\r\n }\r\n },\r\n min: chart.xMin?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),\r\n max: chart.xMax?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),\r\n },\r\n yAxis: {\r\n type: chart.yAxisType,\r\n name: chart.yAxisUom ? `${chart.yAxisName} [ ${chart.yAxisUom} ]` : chart.yAxisName,\r\n nameLocation: 'middle',\r\n nameGap: 50,\r\n splitLine: {\r\n show: chart.showGrid ?? true,\r\n lineStyle: {\r\n color: this.darkTheme ? '#595959' : '#ccc'\r\n }\r\n },\r\n min: chart.yMin?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),\r\n max: chart.yMax?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),\r\n },\r\n series: this.createSeries(chart.shapes),\r\n animation: chart.hasAnimations,\r\n animationDuration: chart.animationDuration ?? 250,\r\n animationEasing: 'cubicOut'\r\n },\r\n true,\r\n true\r\n );\r\n }\r\n\r\n this.setupZrEventHandler(this.echartsInstance);\r\n\r\n this.setupLegendEventHandler(this.echartsInstance);\r\n }\r\n\r\n createSeries(shapes: Shape[]): Array<LineSeriesOption | CustomSeriesOption | ScatterSeriesOption> {\r\n let series: Array<LineSeriesOption | CustomSeriesOption | ScatterSeriesOption> = [];\r\n shapes.forEach(\r\n (shape: Shape) => {\r\n switch (shape.variant) {\r\n case ShapeVariant.TRACE:\r\n series.push(this.createTrace(shape as Trace))\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n );\r\n return series;\r\n }\r\n\r\n createTrace(trace: Trace): LineSeriesOption | ScatterSeriesOption {\r\n return {\r\n type: trace.type,\r\n name: trace.name,\r\n data: trace.points.map(\r\n (point: Point) => ({\r\n value: [point.x, point.y],\r\n symbol: point.symbol ?? 'circle',\r\n name: point.name,\r\n symbolSize: point.symbolSize ?? 2,\r\n itemStyle: {\r\n color: point.color\r\n },\r\n emphasis: {\r\n disabled: true\r\n },\r\n label: {\r\n show: true,\r\n position: 'bottom',\r\n align: 'left',\r\n verticalAlign: 'bottom',\r\n formatter: () => `${point.name ?? ''}`,\r\n fontSize: 13,\r\n padding: [0, 0, 0, 10],\r\n width: 100,\r\n overflow: 'truncate',\r\n ellipsis: '...',\r\n fontWeight: 'bold',\r\n color: this.darkTheme ? '#fff' : '#000'\r\n },\r\n tooltip: {\r\n formatter: ({ value }: { value: number[] }) => `\r\n <strong>${this.chart?.xAxisName}:</strong> ${value[0].toFixed(3).replace(/[.,]000$/, \"\")}\r\n <br>\r\n <strong>${this.chart?.yAxisName}:</strong> ${value[1].toFixed(3).replace(/[.,]000$/, \"\")}\r\n `\r\n }\r\n })\r\n ),\r\n color: trace.color,\r\n lineStyle: {\r\n width: trace.width,\r\n type: trace.style,\r\n opacity: trace.opacity ?? 1\r\n },\r\n smooth: trace.smooth ?? false\r\n };\r\n }\r\n\r\n getLegendItemSelection(shape: Shape): boolean {\r\n if (this.isLegendClicked) {\r\n return this.legendSelected[shape.name as string] ?? true;\r\n }\r\n else {\r\n return shape.selectedByDefault ?? true\r\n }\r\n }\r\n\r\n /**\r\n * intercept a selection change event on the legend and save the state \r\n * of all selections on the supporting variable legendSelected\r\n * \r\n * @param ec \r\n */\r\n setupLegendEventHandler(ec: echarts.ECharts) {\r\n if (this.echartsInstance != null) {\r\n this.echartsInstance.on('legendselectchanged', (params: any) => {\r\n this.isLegendClicked = true;\r\n this.legendSelected = params.selected;\r\n });\r\n }\r\n\r\n }\r\n\r\n setupZrEventHandler(ec: echarts.ECharts) {\r\n this.zr = ec.getZr();\r\n /** \r\n * Intercepts the click event on the chart (if the clickToAddPoint property is set to true)\r\n * and emits the point coordinates to the father component.\r\n */\r\n this.zr.on('click', params => {\r\n let option: any = ec.getOption();\r\n let active = option?.toolbox?.[0]?.feature?.myAddPoint?.iconStatus;\r\n if (active && this.chart?.clickToAddPoint) {\r\n const pointInPixel = [params.offsetX, params.offsetY];\r\n const pointInGrid = ec.convertFromPixel({gridId: 0}, pointInPixel);\r\n if (ec.containPixel({gridId: 0}, pointInPixel) && pointInGrid) {\r\n let newPoint: { x: number, y: number } = {\r\n x: +pointInGrid[0].toFixed(3),\r\n y: +pointInGrid[1].toFixed(3)\r\n };\r\n this.addPoint.emit(newPoint);\r\n }\r\n }\r\n });\r\n /** \r\n * This is used perform custom actions when the mouse is hovering the chart area\r\n */\r\n this.zr.on('mousemove', params => {\r\n const pointInPixel = [params.offsetX, params.offsetY];\r\n const pointInGrid = ec.convertFromPixel('grid', pointInPixel);\r\n /* \r\n * Logic to emit to the father component the x and y cdinates when the\r\n * cursor is hovering the chart area .\r\n */\r\n if (ec.containPixel('grid', pointInPixel) && pointInGrid) {\r\n let newPoint: { x: number, y: number } = {\r\n x: +pointInGrid[0].toFixed(3),\r\n y: +pointInGrid[1].toFixed(3)\r\n };\r\n this.chartHover.emit(newPoint);\r\n }\r\n /* Logic to change the cursor icon when the \"Click to Add Point\" feature is active and viceversa. */\r\n const option: any = ec.getOption();\r\n const addPointIsActive = option?.toolbox?.[0]?.feature?.myAddPoint?.iconStatus;\r\n if (addPointIsActive) {\r\n this.zr?.setCursorStyle(\r\n ec.containPixel('grid', pointInPixel) ? 'copy' : 'default'\r\n );\r\n }\r\n });\r\n }\r\n\r\n}\r\n","// Angular General\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\n// Kiwi Chart\r\nimport { Chart, BasePoint } from '../models/chart.models';\r\nimport { KiwiChartDirective } from '../directives/kiwi-chart.directive';\r\n\r\n@Component({\n selector: 'kiwi-chart',\n template: `\r\n <div \r\n kiwi-chart \r\n [chart]=\"chart\" \r\n [width]=\"width\"\r\n [height]=\"height\"\r\n [darkTheme]=\"darkTheme\"\r\n [darkThemeBackground]=\"darkThemeBackground\"\r\n (addPoint)=\"addPoint.emit($event)\"\r\n (chartHover)=\"chartHover.emit($event)\"\r\n ></div> \r\n `,\n styles: [``],\n imports: [KiwiChartDirective]\n})\r\nexport class KiwiChartComponent {\r\n\r\n /**\r\n * The Chart Object rendered by the canvas. For all the available options refer \r\n * to Chart interface in the models folder.\r\n *\r\n * @type {(Chart | null)}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Input({ required: true }) chart: Chart | null = null;\r\n\r\n /**\r\n * Width and Height of the chart area. The dimensions refer to the father component \r\n * into which the kiwi-chart is inserted. For example in an empty page the width/height \r\n * of the chart can take the whole available space in the page.\r\n *\r\n * @type {string}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Input() width: string = '100%';\r\n @Input() height: string = '480px';\r\n\r\n /**\r\n * This property simply activates or not the dark theme of the chart\r\n * defined by the Echarts library. In addition the background color can be custom\r\n * so that the chart can match the background of the application in which it's used.\r\n *\r\n * @type {boolean}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Input() darkTheme: boolean = false;\r\n @Input() darkThemeBackground: string | null = null;\r\n\r\n /**\r\n * Output event used to emit to the father component the coordinates\r\n * of the point clicked in the chart area. This functionality to be used must\r\n * have the property \"clickToAddPoint\" in the Chart object set to true.\r\n *\r\n * @type {EventEmitter<BasePoint>}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Output() addPoint: EventEmitter<BasePoint> = new EventEmitter<BasePoint>();\r\n\r\n /**\r\n * When the cursor hovers the chart area it emits to the father component the\r\n * x and y coordinates relative to the chart reference system.\r\n *\r\n * @type {EventEmitter<BasePoint>}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Output() chartHover: EventEmitter<BasePoint> = new EventEmitter<BasePoint>();\r\n\r\n}\r\n","/*\r\n * Public API Surface of chart\r\n */\r\n\r\nexport * from './lib/components/chart.component';\r\nexport * from './lib/models/chart.models';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;IA2JY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACjB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EAHW,SAAS,KAAT,SAAS,GAGpB,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,WAAW,EAAA;AACnB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,WAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EANW,WAAW,KAAX,WAAW,GAMtB,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,UAAU,EAAA;AAClB,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACrB,CAAC,EAJW,UAAU,KAAV,UAAU,GAIrB,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAChB,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACnB,CAAC,EAFW,QAAQ,KAAR,QAAQ,GAEnB,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,YAAY,EAAA;AAC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sBAAb;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBAUQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBAUS,QAAQ,EAAA,CAAA;sBAAjB;gBASS,UAAU,EAAA,CAAA;sBAAnB;;;ACzEH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"kiwibit-chart.mjs","sources":["../../../../projects/kiwibit/chart/src/lib/models/chart.models.ts","../../../../projects/kiwibit/chart/src/lib/constants/chart.constants.ts","../../../../projects/kiwibit/chart/src/lib/directives/kiwi-chart.directive.ts","../../../../projects/kiwibit/chart/src/lib/components/chart.component.ts","../../../../projects/kiwibit/chart/src/public-api.ts","../../../../projects/kiwibit/chart/src/kiwibit-chart.ts"],"sourcesContent":["/**\r\n * Interface to define the Chart model.\r\n *\r\n * @export\r\n * @interface Chart\r\n */\r\nexport interface Chart {\r\n title: string;\r\n showLegend?: boolean;\r\n xAxisType: AxisType;\r\n xAxisName: string;\r\n xAxisUom?: string;\r\n xMin?: number;\r\n xMax?: number;\r\n yAxisType: AxisType;\r\n yAxisName: string;\r\n yAxisUom?: string;\r\n yMin?: number;\r\n yMax?: number;\r\n /**\r\n * The maximum decimals that can have the values on the x and y axes.\r\n * If omitted the default is 3 decimals.\r\n *\r\n * @type {number}\r\n * @memberof Chart\r\n */\r\n maxAxesDecimals?: number;\r\n /**\r\n * If the chart should have rendering animations.\r\n *\r\n * @type {boolean}\r\n * @memberof Chart\r\n */\r\n hasAnimations?: boolean;\r\n /**\r\n * How long the animation should last.\r\n * Expressed in milliseconds. If omitted the Default is 500 ms.\r\n *\r\n * @type {number}\r\n * @memberof Chart\r\n */\r\n animationDuration?: number;\r\n /**\r\n * The list of Shapes that the chart must render.\r\n * Each Shape corrisponds to a single chart component.\r\n *\r\n * @type {Shape[]}\r\n * @memberof Chart\r\n */\r\n shapes: Shape[];\r\n /**\r\n * Adds interaction with the chart, so that when clicking\r\n * everywhere in the chart area a point gets added and it's coordinate are \r\n * emitted with an event to the parent component.\r\n *\r\n * @type {boolean}\r\n * @memberof Chart\r\n */\r\n clickToAddPoint?: boolean;\r\n /**\r\n * Custom name for the \"clickToAddPoint\" event related button. \r\n *\r\n * @type {string}\r\n * @memberof Chart\r\n */\r\n addPointCustomName?: string;\r\n /**\r\n * Adds the possibility to use the scroll \r\n * to zoom in/out the chart area.\r\n *\r\n * @type {boolean}\r\n * @memberof Chart\r\n */\r\n scrollToZoom?: boolean;\r\n /**\r\n * Tells the chart to render or not the grid lines.\r\n *\r\n * @type {boolean}\r\n * @memberof Chart\r\n */\r\n showGrid?: boolean;\r\n}\r\n\r\nexport type Shape = Trace;\r\n\r\nexport interface Trace {\r\n name?: string;\r\n /**\r\n * The variant of the Shape, must be of type Trace.\r\n *\r\n * @type {ShapeVariant}\r\n * @memberof Trace\r\n */\r\n variant: ShapeVariant;\r\n color?: string;\r\n /**\r\n * The type of the Trace drawn by the chart.\r\n * Can be a line or a scatter. \r\n *\r\n * @type {TraceType}\r\n * @memberof Trace\r\n */\r\n type: TraceType;\r\n width?: number;\r\n /**\r\n * The list of points that define the Trace.\r\n *\r\n * @type {Point[]}\r\n * @memberof Trace\r\n */\r\n points: Point[];\r\n /**\r\n * Whether to show a smooth curve or a segmented curve.\r\n *\r\n * @type {boolean}\r\n * @memberof Trace\r\n */\r\n smooth?: boolean;\r\n /**\r\n * The style of the Trace.\r\n * Can be solid, dashed or dotted.\r\n *\r\n * @type {TraceStyle}\r\n * @memberof Trace\r\n */\r\n style?: TraceStyle;\r\n /**\r\n * Option to make the Trace selected/deselected by default.\r\n * A deselected Trace is obscured from the chart and can be toggled from the legend. \r\n *\r\n * @type {boolean}\r\n * @memberof Trace\r\n */\r\n selectedByDefault?: boolean;\r\n opacity?: number;\r\n}\r\n\r\nexport interface Point extends BasePoint {\r\n name?: string;\r\n /**\r\n * Symbol used to represent the point in the chart.\r\n *\r\n * @type {PointSymbol}\r\n * @memberof Point\r\n */\r\n symbol?: PointSymbol;\r\n symbolSize?: number;\r\n color?: string;\r\n}\r\n\r\nexport interface BasePoint {\r\n x: number;\r\n y: number\r\n}\r\n\r\nexport enum TraceType {\r\n LINE = \"line\",\r\n SCATTER = \"scatter\"\r\n}\r\n\r\nexport enum PointSymbol {\r\n NONE = \"none\",\r\n CIRCLE = \"circle\",\r\n TRIANGLE = \"triangle\",\r\n PIN = \"pin\",\r\n DIAMOND = \"diamond\"\r\n}\r\n\r\nexport enum TraceStyle {\r\n SOLID = \"solid\",\r\n DASHED = \"dashed\",\r\n DOTTED = \"dotted\"\r\n}\r\n\r\nexport enum AxisType {\r\n VALUE = \"value\"\r\n}\r\n\r\nexport enum ShapeVariant {\r\n TRACE\r\n}\r\n\r\nexport type ChartTheme = 'default' | 'dark';","export const ZOOM_IN: string = \"M39.35 40.45 26.6 27.7q-1.55 1.35-3.6 2.025-2.05.675-4 .675-4.9 0-8.225-3.325Q7.45 23.75 7.45 18.9q0-4.9 3.325-8.225Q14.1 7.35 18.95 7.35q4.85 0 8.225 3.325t3.375 8.175q0 2.1-.725 4.1-.725 2-2.025 3.45l12.8 12.75ZM19 28.65q4.15 0 6.975-2.8 2.825-2.8 2.825-7 0-4.15-2.825-6.95T19 9.1q-4.2 0-7 2.8t-2.8 6.95q0 4.2 2.8 7t7 2.8Zm-.9-5.1V19.7h-3.85v-1.75h3.85v-3.8h1.75v3.8h3.8v1.75h-3.8v3.85Z\";\r\nexport const ZOOM_OUT: string = \"M41.25 39.35 29.55 27.7q-1.5 1.25-3.525 1.975Q24 30.4 22.05 30.4q-2.1 0-3.975-.725T14.9 27.65l1.2-1.2q1.2 1.1 2.65 1.65 1.45.55 3.25.55 4.2 0 7-2.8t2.8-7q0-4.15-2.8-6.95t-7-2.8q-4.15 0-7 2.8-2.85 2.8-2.75 6.95l3.2-3.4 1.3 1.3-5.35 5.35-5.3-5.35 1.3-1.3 3.05 3.3q0-4.85 3.4-8.125Q17.25 7.35 22 7.35q4.9 0 8.225 3.325Q33.55 14 33.55 18.85q0 2.1-.75 4.1-.75 2-1.95 3.45L42.5 38.05Z\";\r\nexport const SAVE_AS_SVG: string = \"M11.3 40.05q-1.35 0-2.35-1t-1-2.35V11.3q0-1.4 1-2.375 1-.975 2.35-.975h25.4q1.4 0 2.375.975.975.975.975 2.375v25.4q0 1.35-.975 2.35t-2.375 1Zm0-1.75h25.4q.6 0 1.1-.5.5-.5.5-1.1V11.3q0-.6-.5-1.1-.5-.5-1.1-.5H11.3q-.6 0-1.1.5-.5.5-.5 1.1v25.4q0 .6.5 1.1.5.5 1.1.5Zm4.1-5.15h17.65l-5.5-7.3-5.2 6.45-3.3-3.85ZM9.7 38.3V9.7v28.6Z\";\r\nexport const RESTORE: string = \"M24.2 25.65q-.65 0-1.125-.475T22.6 24q0-.7.475-1.2t1.175-.5q.65 0 1.175.525T25.95 24q0 .7-.55 1.175-.55.475-1.2.475Zm.1 14.55q-6.4 0-11.1-4.25Q8.5 31.7 8.1 25.4h1.8q.5 5.55 4.6 9.3 4.1 3.75 9.75 3.75 6.05 0 10.225-4.225T38.65 24.05q0-6.05-4.2-10.275Q30.25 9.55 24.3 9.55q-3.2 0-6.025 1.3t-4.875 3.6h4.95v1.75H10.4v-8h1.75v5.05q2.25-2.6 5.475-4.025Q20.85 7.8 24.3 7.8q3.3 0 6.225 1.25t5.125 3.475q2.2 2.225 3.475 5.175Q40.4 20.65 40.4 24q0 3.35-1.275 6.3-1.275 2.95-3.475 5.175-2.2 2.225-5.125 3.475T24.3 40.2Z\";\r\nexport const ADD_POINT: string = \"M222.895-189.538q-22.456 0-37.906-15.451-15.451-15.45-15.451-37.906v-474.21q0-22.456 15.451-37.906 15.45-15.451 38.088-15.451h322.346v28.924H223.077q-10.769 0-17.692 6.923t-6.923 17.692v473.846q0 10.769 6.923 17.692t17.692 6.923h473.846q10.77 0 17.693-6.923 6.923-6.923 6.923-17.692v-322.346h28.923v322.346q0 22.638-15.451 38.088-15.45 15.451-37.906 15.451h-474.21Zm78.028-121.539h28.923v-243.077h-28.923v243.077Zm144.923 0h28.923v-337.846h-28.923v337.846Zm144.308 0h28.923v-148.308h-28.923v148.308Zm100-327.692v-71.385h-71.385v-28.923h71.385v-71.385h28.923v71.385h71.385v28.923h-71.385v71.385h-28.923ZM460-480Z\";\r\n","// Angular Imports\r\nimport { AfterViewInit, Directive, ElementRef, EventEmitter, HostListener, Input, OnChanges, Output, SimpleChanges } from '@angular/core';\r\n// Kiwi Chart Imports\r\nimport { BasePoint, Chart, Point, Shape, ShapeVariant, Trace } from '../models/chart.models';\r\nimport { ADD_POINT, RESTORE, SAVE_AS_SVG, ZOOM_IN, ZOOM_OUT } from '../constants/chart.constants';\r\n// Echarts Imports\r\nimport * as echarts from 'echarts/core';\r\nimport {\r\n ComposeOption,\r\n CustomSeriesOption,\r\n LegendComponentOption,\r\n LineSeriesOption,\r\n ScatterSeriesOption,\r\n ToolboxComponentOption\r\n} from 'echarts/types/dist/shared'; \r\nimport { TitleComponent, TooltipComponent, GridComponent, LegendComponent, DataZoomComponent, ToolboxComponent, TitleComponentOption, TooltipComponentOption, GridComponentOption, DatasetComponentOption } from 'echarts/components';\r\nimport { LineChart, ScatterChart } from 'echarts/charts';\r\nimport { CanvasRenderer } from 'echarts/renderers';\r\necharts.use([\r\n TitleComponent,\r\n TooltipComponent,\r\n GridComponent,\r\n LineChart,\r\n ScatterChart,\r\n CanvasRenderer,\r\n LegendComponent,\r\n DataZoomComponent,\r\n ToolboxComponent,\r\n]);\r\nexport type ECOption = ComposeOption<\r\n | LineSeriesOption\r\n | TitleComponentOption\r\n | TooltipComponentOption\r\n | GridComponentOption\r\n | DatasetComponentOption\r\n | LegendComponentOption\r\n | ToolboxComponentOption\r\n>;\r\n\r\n@Directive({\r\n selector: 'div[kiwi-chart]',\r\n standalone: true\r\n})\r\nexport class KiwiChartDirective implements OnChanges, AfterViewInit {\r\n\r\n /**\r\n * The Chart Object rendered by the canvas. For all the available options refer \r\n * to Chart interface in the models folder.\r\n *\r\n * @type {(Chart | null)}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Input({ required: true }) chart: Chart | null = null;\r\n\r\n /**\r\n * Width and Height of the chart area. The dimensions refer to the father component \r\n * into which the kiwi-chart is inserted. For example in an empty page the width/height \r\n * of the chart can take the whole available space in the page.\r\n *\r\n * @type {string}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Input() width: string = '100%';\r\n @Input() height: string = '480px';\r\n\r\n @Output() chartInit = new EventEmitter<echarts.ECharts>();\r\n\r\n /**\r\n * Output event used to emit to the father component the coordinates\r\n * of the point clicked in the chart area. This functionality to be used must\r\n * have the property \"clickToAddPoint\" in the Chart object set to true.\r\n *\r\n * @type {EventEmitter<BasePoint>}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Output() addPoint: EventEmitter<BasePoint> = new EventEmitter<BasePoint>();\r\n\r\n /**\r\n * When the cursor hovers the chart area it emits to the father component the\r\n * x and y coordinates relative to the chart reference system.\r\n *\r\n * @type {EventEmitter<BasePoint>}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Output() chartHover: EventEmitter<BasePoint> = new EventEmitter<BasePoint>();\r\n\r\n /**\r\n * This property simply activates or not the dark theme of the chart\r\n * defined by the Echarts library. In addition the background color can be custom\r\n * so that the chart can match the background of the application in which it's used.\r\n *\r\n * @type {boolean}\r\n * @memberof KiwiChartDirective\r\n */\r\n @Input() darkTheme: boolean = false;\r\n @Input() darkThemeBackground: string | null = null;\r\n\r\n /**\r\n * The instance of the Chart.\r\n *\r\n * @type {ECharts}\r\n * @memberof KiwiChartDirective\r\n */\r\n echartsInstance: echarts.ECharts | null = null;\r\n\r\n /**\r\n * Default number of decimals that can have\r\n * the values on the x and y axes.\r\n *\r\n * @private\r\n * @type {number}\r\n * @memberof KiwiChartDirective\r\n */\r\n private readonly MAX_DECIMALS: number = 3;\r\n\r\n private legendSelected: { [key: string]: boolean } = {};\r\n private isLegendClicked: boolean = false;\r\n\r\n /**\r\n * Used to perform actions (as point addition based on the cursor position) on the chart.\r\n *\r\n * @type {(zrender.ZRenderType | null)}\r\n * @memberof KiwiChartComponent\r\n */\r\n zr: echarts.zrender.ZRenderType | null = null;\r\n\r\n /**\r\n * If you resize the page, the chart is automatically re-rendered wiht the right proportions.\r\n *\r\n * @memberof EnchartingDirective\r\n */\r\n @HostListener('window:resize', ['$event'])\r\n onResize() {\r\n if (this.echartsInstance) {\r\n this.echartsInstance.resize();\r\n }\r\n }\r\n\r\n constructor(\r\n private el: ElementRef<HTMLDivElement>\r\n ) { }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.chart) {\r\n this.renderChart(this.chart);\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n let chart: Chart = changes['chart']?.currentValue;\r\n if (this.echartsInstance) {\r\n // Every time we have an external change we\r\n // destroy the chart and re-initialize it\r\n this.echartsInstance.dispose();\r\n this.renderChart(chart);\r\n }\r\n }\r\n\r\n renderChart(chart: Chart): void {\r\n // Update ElementRef styles\r\n this.el.nativeElement.style.width = this.width;\r\n this.el.nativeElement.style.height = this.height;\r\n\r\n this.echartsInstance = echarts.init(\r\n this.el.nativeElement,\r\n this.darkTheme ? 'dark' : 'default',\r\n {\r\n renderer: 'svg'\r\n }\r\n );\r\n\r\n if (chart) {\r\n this.echartsInstance.setOption({\r\n title: {\r\n text: chart.title,\r\n },\r\n grid: {\r\n id: 0,\r\n width: '70%'\r\n },\r\n backgroundColor: this.darkTheme ? this.darkThemeBackground ?? '#303030' : 'transparent', tooltip: {\r\n axisPointer: {\r\n type: 'cross',\r\n crossStyle: {\r\n color: '#bebebe'\r\n }\r\n }\r\n },\r\n toolbox: {\r\n orient: 'horizontal',\r\n left: 'center',\r\n top: '25px',\r\n feature: {\r\n dataZoom: {\r\n brushStyle: {\r\n borderColor: '#000',\r\n borderWidth: 1,\r\n borderType: 'dashed'\r\n },\r\n emphasis: {\r\n iconStyle: {\r\n textPosition: 'top',\r\n textPadding: 5\r\n }\r\n },\r\n icon: {\r\n zoom: ZOOM_IN,\r\n back: ZOOM_OUT\r\n },\r\n },\r\n saveAsImage: {\r\n emphasis: {\r\n iconStyle: {\r\n textPosition: 'top',\r\n textPadding: 5\r\n }\r\n },\r\n icon: SAVE_AS_SVG,\r\n },\r\n restore: {\r\n emphasis: {\r\n iconStyle: {\r\n textPosition: 'top',\r\n textPadding: 5\r\n }\r\n },\r\n icon: RESTORE,\r\n },\r\n myAddPoint: {\r\n show: chart.clickToAddPoint ?? false,\r\n title: chart.addPointCustomName ?? 'Add Point',\r\n icon: ADD_POINT,\r\n onclick: () => {\r\n if (this.echartsInstance) {\r\n const option: ECOption = this.echartsInstance.getOption();\r\n const toolbox = option.toolbox as ToolboxComponentOption[];\r\n if (toolbox) {\r\n const status: boolean = toolbox[0].feature?.['myAddPoint']?.iconStatus;\r\n const offColor: string = 'rgb(102,102,102)';\r\n const highlightColor: string = 'rgb(62,152,197)';\r\n this.echartsInstance.setOption({\r\n toolbox: {\r\n feature: {\r\n myAddPoint: {\r\n iconStatus: !status,\r\n iconStyle: {\r\n borderColor: !status ? highlightColor : offColor\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n },\r\n emphasis: {\r\n iconStyle: {\r\n textPosition: 'top',\r\n textPadding: 5\r\n }\r\n }\r\n }\r\n },\r\n },\r\n dataZoom: [\r\n {\r\n type: 'inside',\r\n xAxisIndex: [0],\r\n throttle: 0,\r\n filterMode: 'none',\r\n disabled: !chart.scrollToZoom\r\n },\r\n {\r\n type: 'inside',\r\n yAxisIndex: [0],\r\n throttle: 0,\r\n filterMode: 'none',\r\n disabled: !chart.scrollToZoom\r\n },\r\n ],\r\n legend: {\r\n inactiveColor: this.darkTheme ? '#8b8b8b' : '#ccc',\r\n data: chart.shapes.map(\r\n (shape: Shape) => ({\r\n name: shape.name,\r\n icon: 'circle',\r\n })\r\n ),\r\n selected: chart.shapes.reduce(\r\n (accumulator, shape: Shape) => ({\r\n ...accumulator,\r\n [shape.name as string]: this.getLegendItemSelection(shape),\r\n }),\r\n {}),\r\n show: chart.showLegend ?? false,\r\n orient: 'vertical',\r\n left: 'right',\r\n padding: [60, 20],\r\n type: 'scroll',\r\n textStyle: {\r\n width: 120,\r\n fontWeight: 'bold',\r\n overflow: 'break'\r\n }\r\n },\r\n xAxis: {\r\n type: chart.xAxisType,\r\n name: chart.xAxisUom ? `${chart.xAxisName} [ ${chart.xAxisUom} ]` : chart.xAxisName,\r\n nameLocation: 'middle',\r\n nameGap: 30,\r\n splitLine: {\r\n show: chart.showGrid ?? true,\r\n lineStyle: {\r\n color: this.darkTheme ? '#595959' : '#ccc'\r\n }\r\n },\r\n min: chart.xMin?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),\r\n max: chart.xMax?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),\r\n },\r\n yAxis: {\r\n type: chart.yAxisType,\r\n name: chart.yAxisUom ? `${chart.yAxisName} [ ${chart.yAxisUom} ]` : chart.yAxisName,\r\n nameLocation: 'middle',\r\n nameGap: 50,\r\n splitLine: {\r\n show: chart.showGrid ?? true,\r\n lineStyle: {\r\n color: this.darkTheme ? '#595959' : '#ccc'\r\n }\r\n },\r\n min: chart.yMin?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),\r\n max: chart.yMax?.toFixed(chart.maxAxesDecimals ?? this.MAX_DECIMALS),\r\n },\r\n series: this.createSeries(chart.shapes),\r\n animation: chart.hasAnimations,\r\n animationDuration: chart.animationDuration ?? 250,\r\n animationEasing: 'cubicOut'\r\n },\r\n true,\r\n true\r\n );\r\n }\r\n\r\n this.setupZrEventHandler(this.echartsInstance);\r\n\r\n this.setupLegendEventHandler(this.echartsInstance);\r\n }\r\n\r\n createSeries(shapes: Shape[]): Array<LineSeriesOption | CustomSeriesOption | ScatterSeriesOption> {\r\n let series: Array<LineSeriesOption | CustomSeriesOption | ScatterSeriesOption> = [];\r\n shapes.forEach(\r\n (shape: Shape) => {\r\n switch (shape.variant) {\r\n case ShapeVariant.TRACE:\r\n series.push(this.createTrace(shape as Trace))\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n );\r\n return series;\r\n }\r\n\r\n createTrace(trace: Trace): LineSeriesOption | ScatterSeriesOption {\r\n return {\r\n type: trace.type,\r\n name: trace.name,\r\n data: trace.points.map(\r\n (point: Point) => ({\r\n value: [point.x, point.y],\r\n symbol: point.symbol ?? 'circle',\r\n name: point.name,\r\n symbolSize: point.symbolSize ?? 2,\r\n itemStyle: {\r\n color: point.color\r\n },\r\n emphasis: {\r\n disabled: true\r\n },\r\n label: {\r\n show: true,\r\n position: 'bottom',\r\n align: 'left',\r\n verticalAlign: 'bottom',\r\n formatter: () => `${point.name ?? ''}`,\r\n fontSize: 13,\r\n padding: [0, 0, 0, 10],\r\n width: 100,\r\n overflow: 'truncate',\r\n ellipsis: '...',\r\n fontWeight: 'bold',\r\n color: this.darkTheme ? '#fff' : '#000'\r\n },\r\n tooltip: {\r\n formatter: ({ value }: { value: number[] }) => `\r\n <strong>${this.chart?.xAxisName}:</strong> ${value[0].toFixed(3).replace(/[.,]000$/, \"\")}\r\n <br>\r\n <strong>${this.chart?.yAxisName}:</strong> ${value[1].toFixed(3).replace(/[.,]000$/, \"\")}\r\n `\r\n }\r\n })\r\n ),\r\n color: trace.color,\r\n lineStyle: {\r\n width: trace.width,\r\n type: trace.style,\r\n opacity: trace.opacity ?? 1\r\n },\r\n smooth: trace.smooth ?? false\r\n };\r\n }\r\n\r\n getLegendItemSelection(shape: Shape): boolean {\r\n if (this.isLegendClicked) {\r\n return this.legendSelected[shape.name as string] ?? true;\r\n }\r\n else {\r\n return shape.selectedByDefault ?? true\r\n }\r\n }\r\n\r\n /**\r\n * intercept a selection change event on the legend and save the state \r\n * of all selections on the supporting variable legendSelected\r\n * \r\n * @param ec \r\n */\r\n setupLegendEventHandler(ec: echarts.ECharts) {\r\n if (this.echartsInstance != null) {\r\n this.echartsInstance.on('legendselectchanged', (params: any) => {\r\n this.isLegendClicked = true;\r\n this.legendSelected = params.selected;\r\n });\r\n }\r\n\r\n }\r\n\r\n setupZrEventHandler(ec: echarts.ECharts) {\r\n this.zr = ec.getZr();\r\n /** \r\n * Intercepts the click event on the chart (if the clickToAddPoint property is set to true)\r\n * and emits the point coordinates to the father component.\r\n */\r\n this.zr.on('click', params => {\r\n let option: any = ec.getOption();\r\n let active = option?.toolbox?.[0]?.feature?.myAddPoint?.iconStatus;\r\n if (active && this.chart?.clickToAddPoint) {\r\n const pointInPixel = [params.offsetX, params.offsetY];\r\n const pointInGrid = ec.convertFromPixel({gridId: 0}, pointInPixel);\r\n if (ec.containPixel({gridId: 0}, pointInPixel) && pointInGrid) {\r\n let newPoint: { x: number, y: number } = {\r\n x: +pointInGrid[0].toFixed(3),\r\n y: +pointInGrid[1].toFixed(3)\r\n };\r\n this.addPoint.emit(newPoint);\r\n }\r\n }\r\n });\r\n /** \r\n * This is used perform custom actions when the mouse is hovering the chart area\r\n */\r\n this.zr.on('mousemove', params => {\r\n const pointInPixel = [params.offsetX, params.offsetY];\r\n const pointInGrid = ec.convertFromPixel('grid', pointInPixel);\r\n /* \r\n * Logic to emit to the father component the x and y cdinates when the\r\n * cursor is hovering the chart area .\r\n */\r\n if (ec.containPixel('grid', pointInPixel) && pointInGrid) {\r\n let newPoint: { x: number, y: number } = {\r\n x: +pointInGrid[0].toFixed(3),\r\n y: +pointInGrid[1].toFixed(3)\r\n };\r\n this.chartHover.emit(newPoint);\r\n }\r\n /* Logic to change the cursor icon when the \"Click to Add Point\" feature is active and viceversa. */\r\n const option: any = ec.getOption();\r\n const addPointIsActive = option?.toolbox?.[0]?.feature?.myAddPoint?.iconStatus;\r\n if (addPointIsActive) {\r\n this.zr?.setCursorStyle(\r\n ec.containPixel('grid', pointInPixel) ? 'copy' : 'default'\r\n );\r\n }\r\n });\r\n }\r\n\r\n}\r\n","// Angular General\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\n// Kiwi Chart\r\nimport { Chart, BasePoint } from '../models/chart.models';\r\nimport { KiwiChartDirective } from '../directives/kiwi-chart.directive';\r\n\r\n@Component({\r\n selector: 'kiwi-chart',\r\n template: `\r\n <div \r\n kiwi-chart \r\n [chart]=\"chart\" \r\n [width]=\"width\"\r\n [height]=\"height\"\r\n [darkTheme]=\"darkTheme\"\r\n [darkThemeBackground]=\"darkThemeBackground\"\r\n (addPoint)=\"addPoint.emit($event)\"\r\n (chartHover)=\"chartHover.emit($event)\"\r\n ></div> \r\n `,\r\n styles: [``],\r\n imports: [KiwiChartDirective]\r\n})\r\nexport class KiwiChartComponent {\r\n\r\n /**\r\n * The Chart Object rendered by the canvas. For all the available options refer \r\n * to Chart interface in the models folder.\r\n *\r\n * @type {(Chart | null)}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Input({ required: true }) chart: Chart | null = null;\r\n\r\n /**\r\n * Width and Height of the chart area. The dimensions refer to the father component \r\n * into which the kiwi-chart is inserted. For example in an empty page the width/height \r\n * of the chart can take the whole available space in the page.\r\n *\r\n * @type {string}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Input() width: string = '100%';\r\n @Input() height: string = '480px';\r\n\r\n /**\r\n * This property simply activates or not the dark theme of the chart\r\n * defined by the Echarts library. In addition the background color can be custom\r\n * so that the chart can match the background of the application in which it's used.\r\n *\r\n * @type {boolean}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Input() darkTheme: boolean = false;\r\n @Input() darkThemeBackground: string | null = null;\r\n\r\n /**\r\n * Output event used to emit to the father component the coordinates\r\n * of the point clicked in the chart area. This functionality to be used must\r\n * have the property \"clickToAddPoint\" in the Chart object set to true.\r\n *\r\n * @type {EventEmitter<BasePoint>}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Output() addPoint: EventEmitter<BasePoint> = new EventEmitter<BasePoint>();\r\n\r\n /**\r\n * When the cursor hovers the chart area it emits to the father component the\r\n * x and y coordinates relative to the chart reference system.\r\n *\r\n * @type {EventEmitter<BasePoint>}\r\n * @memberof KiwiChartComponent\r\n */\r\n @Output() chartHover: EventEmitter<BasePoint> = new EventEmitter<BasePoint>();\r\n\r\n}\r\n","/*\r\n * Public API Surface of chart\r\n */\r\n\r\nexport * from './lib/components/chart.component';\r\nexport * from './lib/models/chart.models';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;IA2JY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACjB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EAHW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;IAKT;AAAZ,CAAA,UAAY,WAAW,EAAA;AACnB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,WAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EANW,WAAW,KAAX,WAAW,GAAA,EAAA,CAAA,CAAA;IAQX;AAAZ,CAAA,UAAY,UAAU,EAAA;AAClB,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACrB,CAAC,EAJW,UAAU,KAAV,UAAU,GAAA,EAAA,CAAA,CAAA;IAMV;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAChB,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACnB,CAAC,EAFW,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;IAIR;AAAZ,CAAA,UAAY,YAAY,EAAA;AACpB,IAAA,YAAA,CAAA,YAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK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A,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,KAAA,EAAA,OAAA,EAAA,MAAA,EAAA,QAAA,EAAA,SAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,qBAAA,EAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAfjB,CAAA;;;;;;;;;;;AAWX,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAEW,kBAAkB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,qBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,WAAA,EAAA,UAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAEnB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAjB9B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,QAAA,EACZ,CAAA;;;;;;;;;;;GAWX,EAAA,OAAA,EAEU,CAAC,kBAAkB,CAAC,EAAA;;sBAW9B,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBAUxB;;sBACA;;sBAUA;;sBACA;;sBAUA;;sBASA;;;ACzEH;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,5 +1,229 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter } from '@angular/core';
3
+
1
4
  /**
2
- * Generated bundle index. Do not edit.
5
+ * Interface to define the Chart model.
6
+ *
7
+ * @export
8
+ * @interface Chart
3
9
  */
4
- /// <amd-module name="@kiwibit/chart" />
5
- export * from './public-api';
10
+ interface Chart {
11
+ title: string;
12
+ showLegend?: boolean;
13
+ xAxisType: AxisType;
14
+ xAxisName: string;
15
+ xAxisUom?: string;
16
+ xMin?: number;
17
+ xMax?: number;
18
+ yAxisType: AxisType;
19
+ yAxisName: string;
20
+ yAxisUom?: string;
21
+ yMin?: number;
22
+ yMax?: number;
23
+ /**
24
+ * The maximum decimals that can have the values on the x and y axes.
25
+ * If omitted the default is 3 decimals.
26
+ *
27
+ * @type {number}
28
+ * @memberof Chart
29
+ */
30
+ maxAxesDecimals?: number;
31
+ /**
32
+ * If the chart should have rendering animations.
33
+ *
34
+ * @type {boolean}
35
+ * @memberof Chart
36
+ */
37
+ hasAnimations?: boolean;
38
+ /**
39
+ * How long the animation should last.
40
+ * Expressed in milliseconds. If omitted the Default is 500 ms.
41
+ *
42
+ * @type {number}
43
+ * @memberof Chart
44
+ */
45
+ animationDuration?: number;
46
+ /**
47
+ * The list of Shapes that the chart must render.
48
+ * Each Shape corrisponds to a single chart component.
49
+ *
50
+ * @type {Shape[]}
51
+ * @memberof Chart
52
+ */
53
+ shapes: Shape[];
54
+ /**
55
+ * Adds interaction with the chart, so that when clicking
56
+ * everywhere in the chart area a point gets added and it's coordinate are
57
+ * emitted with an event to the parent component.
58
+ *
59
+ * @type {boolean}
60
+ * @memberof Chart
61
+ */
62
+ clickToAddPoint?: boolean;
63
+ /**
64
+ * Custom name for the "clickToAddPoint" event related button.
65
+ *
66
+ * @type {string}
67
+ * @memberof Chart
68
+ */
69
+ addPointCustomName?: string;
70
+ /**
71
+ * Adds the possibility to use the scroll
72
+ * to zoom in/out the chart area.
73
+ *
74
+ * @type {boolean}
75
+ * @memberof Chart
76
+ */
77
+ scrollToZoom?: boolean;
78
+ /**
79
+ * Tells the chart to render or not the grid lines.
80
+ *
81
+ * @type {boolean}
82
+ * @memberof Chart
83
+ */
84
+ showGrid?: boolean;
85
+ }
86
+ type Shape = Trace;
87
+ interface Trace {
88
+ name?: string;
89
+ /**
90
+ * The variant of the Shape, must be of type Trace.
91
+ *
92
+ * @type {ShapeVariant}
93
+ * @memberof Trace
94
+ */
95
+ variant: ShapeVariant;
96
+ color?: string;
97
+ /**
98
+ * The type of the Trace drawn by the chart.
99
+ * Can be a line or a scatter.
100
+ *
101
+ * @type {TraceType}
102
+ * @memberof Trace
103
+ */
104
+ type: TraceType;
105
+ width?: number;
106
+ /**
107
+ * The list of points that define the Trace.
108
+ *
109
+ * @type {Point[]}
110
+ * @memberof Trace
111
+ */
112
+ points: Point[];
113
+ /**
114
+ * Whether to show a smooth curve or a segmented curve.
115
+ *
116
+ * @type {boolean}
117
+ * @memberof Trace
118
+ */
119
+ smooth?: boolean;
120
+ /**
121
+ * The style of the Trace.
122
+ * Can be solid, dashed or dotted.
123
+ *
124
+ * @type {TraceStyle}
125
+ * @memberof Trace
126
+ */
127
+ style?: TraceStyle;
128
+ /**
129
+ * Option to make the Trace selected/deselected by default.
130
+ * A deselected Trace is obscured from the chart and can be toggled from the legend.
131
+ *
132
+ * @type {boolean}
133
+ * @memberof Trace
134
+ */
135
+ selectedByDefault?: boolean;
136
+ opacity?: number;
137
+ }
138
+ interface Point extends BasePoint {
139
+ name?: string;
140
+ /**
141
+ * Symbol used to represent the point in the chart.
142
+ *
143
+ * @type {PointSymbol}
144
+ * @memberof Point
145
+ */
146
+ symbol?: PointSymbol;
147
+ symbolSize?: number;
148
+ color?: string;
149
+ }
150
+ interface BasePoint {
151
+ x: number;
152
+ y: number;
153
+ }
154
+ declare enum TraceType {
155
+ LINE = "line",
156
+ SCATTER = "scatter"
157
+ }
158
+ declare enum PointSymbol {
159
+ NONE = "none",
160
+ CIRCLE = "circle",
161
+ TRIANGLE = "triangle",
162
+ PIN = "pin",
163
+ DIAMOND = "diamond"
164
+ }
165
+ declare enum TraceStyle {
166
+ SOLID = "solid",
167
+ DASHED = "dashed",
168
+ DOTTED = "dotted"
169
+ }
170
+ declare enum AxisType {
171
+ VALUE = "value"
172
+ }
173
+ declare enum ShapeVariant {
174
+ TRACE = 0
175
+ }
176
+ type ChartTheme = 'default' | 'dark';
177
+
178
+ declare class KiwiChartComponent {
179
+ /**
180
+ * The Chart Object rendered by the canvas. For all the available options refer
181
+ * to Chart interface in the models folder.
182
+ *
183
+ * @type {(Chart | null)}
184
+ * @memberof KiwiChartComponent
185
+ */
186
+ chart: Chart | null;
187
+ /**
188
+ * Width and Height of the chart area. The dimensions refer to the father component
189
+ * into which the kiwi-chart is inserted. For example in an empty page the width/height
190
+ * of the chart can take the whole available space in the page.
191
+ *
192
+ * @type {string}
193
+ * @memberof KiwiChartComponent
194
+ */
195
+ width: string;
196
+ height: string;
197
+ /**
198
+ * This property simply activates or not the dark theme of the chart
199
+ * defined by the Echarts library. In addition the background color can be custom
200
+ * so that the chart can match the background of the application in which it's used.
201
+ *
202
+ * @type {boolean}
203
+ * @memberof KiwiChartComponent
204
+ */
205
+ darkTheme: boolean;
206
+ darkThemeBackground: string | null;
207
+ /**
208
+ * Output event used to emit to the father component the coordinates
209
+ * of the point clicked in the chart area. This functionality to be used must
210
+ * have the property "clickToAddPoint" in the Chart object set to true.
211
+ *
212
+ * @type {EventEmitter<BasePoint>}
213
+ * @memberof KiwiChartComponent
214
+ */
215
+ addPoint: EventEmitter<BasePoint>;
216
+ /**
217
+ * When the cursor hovers the chart area it emits to the father component the
218
+ * x and y coordinates relative to the chart reference system.
219
+ *
220
+ * @type {EventEmitter<BasePoint>}
221
+ * @memberof KiwiChartComponent
222
+ */
223
+ chartHover: EventEmitter<BasePoint>;
224
+ static ɵfac: i0.ɵɵFactoryDeclaration<KiwiChartComponent, never>;
225
+ static ɵcmp: i0.ɵɵComponentDeclaration<KiwiChartComponent, "kiwi-chart", never, { "chart": { "alias": "chart"; "required": true; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "darkTheme": { "alias": "darkTheme"; "required": false; }; "darkThemeBackground": { "alias": "darkThemeBackground"; "required": false; }; }, { "addPoint": "addPoint"; "chartHover": "chartHover"; }, never, never, true, never>;
226
+ }
227
+
228
+ export { AxisType, KiwiChartComponent, PointSymbol, ShapeVariant, TraceStyle, TraceType };
229
+ export type { BasePoint, Chart, ChartTheme, Point, Shape, Trace };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@kiwibit/chart",
3
- "version": "19.0.0",
3
+ "version": "20.0.1",
4
4
  "engines": {
5
5
  "node": "^18.19.1 || ^20.11.1 || ^22.0.0"
6
6
  },
7
7
  "peerDependencies": {
8
- "@angular/common": "^19.1.3",
9
- "@angular/core": "^19.1.3"
8
+ "@angular/common": "^20.2.14",
9
+ "@angular/core": "^20.2.14"
10
10
  },
11
11
  "dependencies": {
12
12
  "echarts": "^5.6.0",
@@ -1,52 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { Chart, BasePoint } from '../models/chart.models';
3
- import * as i0 from "@angular/core";
4
- export declare class KiwiChartComponent {
5
- /**
6
- * The Chart Object rendered by the canvas. For all the available options refer
7
- * to Chart interface in the models folder.
8
- *
9
- * @type {(Chart | null)}
10
- * @memberof KiwiChartComponent
11
- */
12
- chart: Chart | null;
13
- /**
14
- * Width and Height of the chart area. The dimensions refer to the father component
15
- * into which the kiwi-chart is inserted. For example in an empty page the width/height
16
- * of the chart can take the whole available space in the page.
17
- *
18
- * @type {string}
19
- * @memberof KiwiChartComponent
20
- */
21
- width: string;
22
- height: string;
23
- /**
24
- * This property simply activates or not the dark theme of the chart
25
- * defined by the Echarts library. In addition the background color can be custom
26
- * so that the chart can match the background of the application in which it's used.
27
- *
28
- * @type {boolean}
29
- * @memberof KiwiChartComponent
30
- */
31
- darkTheme: boolean;
32
- darkThemeBackground: string | null;
33
- /**
34
- * Output event used to emit to the father component the coordinates
35
- * of the point clicked in the chart area. This functionality to be used must
36
- * have the property "clickToAddPoint" in the Chart object set to true.
37
- *
38
- * @type {EventEmitter<BasePoint>}
39
- * @memberof KiwiChartComponent
40
- */
41
- addPoint: EventEmitter<BasePoint>;
42
- /**
43
- * When the cursor hovers the chart area it emits to the father component the
44
- * x and y coordinates relative to the chart reference system.
45
- *
46
- * @type {EventEmitter<BasePoint>}
47
- * @memberof KiwiChartComponent
48
- */
49
- chartHover: EventEmitter<BasePoint>;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<KiwiChartComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<KiwiChartComponent, "kiwi-chart", never, { "chart": { "alias": "chart"; "required": true; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "darkTheme": { "alias": "darkTheme"; "required": false; }; "darkThemeBackground": { "alias": "darkThemeBackground"; "required": false; }; }, { "addPoint": "addPoint"; "chartHover": "chartHover"; }, never, never, true, never>;
52
- }
@@ -1,5 +0,0 @@
1
- export declare const ZOOM_IN: string;
2
- export declare const ZOOM_OUT: string;
3
- export declare const SAVE_AS_SVG: string;
4
- export declare const RESTORE: string;
5
- export declare const ADD_POINT: string;
@@ -1,104 +0,0 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
- import { BasePoint, Chart, Shape, Trace } from '../models/chart.models';
3
- import * as echarts from 'echarts/core';
4
- import { ComposeOption, CustomSeriesOption, LegendComponentOption, LineSeriesOption, ScatterSeriesOption, ToolboxComponentOption } from 'echarts/types/dist/shared';
5
- import { TitleComponentOption, TooltipComponentOption, GridComponentOption, DatasetComponentOption } from 'echarts/components';
6
- import * as i0 from "@angular/core";
7
- export type ECOption = ComposeOption<LineSeriesOption | TitleComponentOption | TooltipComponentOption | GridComponentOption | DatasetComponentOption | LegendComponentOption | ToolboxComponentOption>;
8
- export declare class KiwiChartDirective implements OnChanges, AfterViewInit {
9
- private el;
10
- /**
11
- * The Chart Object rendered by the canvas. For all the available options refer
12
- * to Chart interface in the models folder.
13
- *
14
- * @type {(Chart | null)}
15
- * @memberof KiwiChartDirective
16
- */
17
- chart: Chart | null;
18
- /**
19
- * Width and Height of the chart area. The dimensions refer to the father component
20
- * into which the kiwi-chart is inserted. For example in an empty page the width/height
21
- * of the chart can take the whole available space in the page.
22
- *
23
- * @type {string}
24
- * @memberof KiwiChartDirective
25
- */
26
- width: string;
27
- height: string;
28
- chartInit: EventEmitter<echarts.ECharts>;
29
- /**
30
- * Output event used to emit to the father component the coordinates
31
- * of the point clicked in the chart area. This functionality to be used must
32
- * have the property "clickToAddPoint" in the Chart object set to true.
33
- *
34
- * @type {EventEmitter<BasePoint>}
35
- * @memberof KiwiChartDirective
36
- */
37
- addPoint: EventEmitter<BasePoint>;
38
- /**
39
- * When the cursor hovers the chart area it emits to the father component the
40
- * x and y coordinates relative to the chart reference system.
41
- *
42
- * @type {EventEmitter<BasePoint>}
43
- * @memberof KiwiChartDirective
44
- */
45
- chartHover: EventEmitter<BasePoint>;
46
- /**
47
- * This property simply activates or not the dark theme of the chart
48
- * defined by the Echarts library. In addition the background color can be custom
49
- * so that the chart can match the background of the application in which it's used.
50
- *
51
- * @type {boolean}
52
- * @memberof KiwiChartDirective
53
- */
54
- darkTheme: boolean;
55
- darkThemeBackground: string | null;
56
- /**
57
- * The instance of the Chart.
58
- *
59
- * @type {ECharts}
60
- * @memberof KiwiChartDirective
61
- */
62
- echartsInstance: echarts.ECharts | null;
63
- /**
64
- * Default number of decimals that can have
65
- * the values on the x and y axes.
66
- *
67
- * @private
68
- * @type {number}
69
- * @memberof KiwiChartDirective
70
- */
71
- private readonly MAX_DECIMALS;
72
- private legendSelected;
73
- private isLegendClicked;
74
- /**
75
- * Used to perform actions (as point addition based on the cursor position) on the chart.
76
- *
77
- * @type {(zrender.ZRenderType | null)}
78
- * @memberof KiwiChartComponent
79
- */
80
- zr: echarts.zrender.ZRenderType | null;
81
- /**
82
- * If you resize the page, the chart is automatically re-rendered wiht the right proportions.
83
- *
84
- * @memberof EnchartingDirective
85
- */
86
- onResize(): void;
87
- constructor(el: ElementRef<HTMLDivElement>);
88
- ngAfterViewInit(): void;
89
- ngOnChanges(changes: SimpleChanges): void;
90
- renderChart(chart: Chart): void;
91
- createSeries(shapes: Shape[]): Array<LineSeriesOption | CustomSeriesOption | ScatterSeriesOption>;
92
- createTrace(trace: Trace): LineSeriesOption | ScatterSeriesOption;
93
- getLegendItemSelection(shape: Shape): boolean;
94
- /**
95
- * intercept a selection change event on the legend and save the state
96
- * of all selections on the supporting variable legendSelected
97
- *
98
- * @param ec
99
- */
100
- setupLegendEventHandler(ec: echarts.ECharts): void;
101
- setupZrEventHandler(ec: echarts.ECharts): void;
102
- static ɵfac: i0.ɵɵFactoryDeclaration<KiwiChartDirective, never>;
103
- static ɵdir: i0.ɵɵDirectiveDeclaration<KiwiChartDirective, "div[kiwi-chart]", never, { "chart": { "alias": "chart"; "required": true; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "darkTheme": { "alias": "darkTheme"; "required": false; }; "darkThemeBackground": { "alias": "darkThemeBackground"; "required": false; }; }, { "chartInit": "chartInit"; "addPoint": "addPoint"; "chartHover": "chartHover"; }, never, never, true, never>;
104
- }
@@ -1,173 +0,0 @@
1
- /**
2
- * Interface to define the Chart model.
3
- *
4
- * @export
5
- * @interface Chart
6
- */
7
- export interface Chart {
8
- title: string;
9
- showLegend?: boolean;
10
- xAxisType: AxisType;
11
- xAxisName: string;
12
- xAxisUom?: string;
13
- xMin?: number;
14
- xMax?: number;
15
- yAxisType: AxisType;
16
- yAxisName: string;
17
- yAxisUom?: string;
18
- yMin?: number;
19
- yMax?: number;
20
- /**
21
- * The maximum decimals that can have the values on the x and y axes.
22
- * If omitted the default is 3 decimals.
23
- *
24
- * @type {number}
25
- * @memberof Chart
26
- */
27
- maxAxesDecimals?: number;
28
- /**
29
- * If the chart should have rendering animations.
30
- *
31
- * @type {boolean}
32
- * @memberof Chart
33
- */
34
- hasAnimations?: boolean;
35
- /**
36
- * How long the animation should last.
37
- * Expressed in milliseconds. If omitted the Default is 500 ms.
38
- *
39
- * @type {number}
40
- * @memberof Chart
41
- */
42
- animationDuration?: number;
43
- /**
44
- * The list of Shapes that the chart must render.
45
- * Each Shape corrisponds to a single chart component.
46
- *
47
- * @type {Shape[]}
48
- * @memberof Chart
49
- */
50
- shapes: Shape[];
51
- /**
52
- * Adds interaction with the chart, so that when clicking
53
- * everywhere in the chart area a point gets added and it's coordinate are
54
- * emitted with an event to the parent component.
55
- *
56
- * @type {boolean}
57
- * @memberof Chart
58
- */
59
- clickToAddPoint?: boolean;
60
- /**
61
- * Custom name for the "clickToAddPoint" event related button.
62
- *
63
- * @type {string}
64
- * @memberof Chart
65
- */
66
- addPointCustomName?: string;
67
- /**
68
- * Adds the possibility to use the scroll
69
- * to zoom in/out the chart area.
70
- *
71
- * @type {boolean}
72
- * @memberof Chart
73
- */
74
- scrollToZoom?: boolean;
75
- /**
76
- * Tells the chart to render or not the grid lines.
77
- *
78
- * @type {boolean}
79
- * @memberof Chart
80
- */
81
- showGrid?: boolean;
82
- }
83
- export type Shape = Trace;
84
- export interface Trace {
85
- name?: string;
86
- /**
87
- * The variant of the Shape, must be of type Trace.
88
- *
89
- * @type {ShapeVariant}
90
- * @memberof Trace
91
- */
92
- variant: ShapeVariant;
93
- color?: string;
94
- /**
95
- * The type of the Trace drawn by the chart.
96
- * Can be a line or a scatter.
97
- *
98
- * @type {TraceType}
99
- * @memberof Trace
100
- */
101
- type: TraceType;
102
- width?: number;
103
- /**
104
- * The list of points that define the Trace.
105
- *
106
- * @type {Point[]}
107
- * @memberof Trace
108
- */
109
- points: Point[];
110
- /**
111
- * Whether to show a smooth curve or a segmented curve.
112
- *
113
- * @type {boolean}
114
- * @memberof Trace
115
- */
116
- smooth?: boolean;
117
- /**
118
- * The style of the Trace.
119
- * Can be solid, dashed or dotted.
120
- *
121
- * @type {TraceStyle}
122
- * @memberof Trace
123
- */
124
- style?: TraceStyle;
125
- /**
126
- * Option to make the Trace selected/deselected by default.
127
- * A deselected Trace is obscured from the chart and can be toggled from the legend.
128
- *
129
- * @type {boolean}
130
- * @memberof Trace
131
- */
132
- selectedByDefault?: boolean;
133
- opacity?: number;
134
- }
135
- export interface Point extends BasePoint {
136
- name?: string;
137
- /**
138
- * Symbol used to represent the point in the chart.
139
- *
140
- * @type {PointSymbol}
141
- * @memberof Point
142
- */
143
- symbol?: PointSymbol;
144
- symbolSize?: number;
145
- color?: string;
146
- }
147
- export interface BasePoint {
148
- x: number;
149
- y: number;
150
- }
151
- export declare enum TraceType {
152
- LINE = "line",
153
- SCATTER = "scatter"
154
- }
155
- export declare enum PointSymbol {
156
- NONE = "none",
157
- CIRCLE = "circle",
158
- TRIANGLE = "triangle",
159
- PIN = "pin",
160
- DIAMOND = "diamond"
161
- }
162
- export declare enum TraceStyle {
163
- SOLID = "solid",
164
- DASHED = "dashed",
165
- DOTTED = "dotted"
166
- }
167
- export declare enum AxisType {
168
- VALUE = "value"
169
- }
170
- export declare enum ShapeVariant {
171
- TRACE = 0
172
- }
173
- export type ChartTheme = 'default' | 'dark';
package/public-api.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './lib/components/chart.component';
2
- export * from './lib/models/chart.models';