ngx-trend 6.1.0 → 8.0.0

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 +0,0 @@
1
- {"version":3,"file":"ngx-trend.js","sources":["../src/lib/helpers/math.helpers.ts","../src/lib/helpers/DOM.helpers.ts","../src/lib/helpers/misc.helpers.ts","../src/lib/trend/trend.helpers.ts","../src/lib/trend/trend.component.ts","../src/lib/trend/trend.module.ts","../../src/lib/ngx-trend.ts"],"sourcesContent":["/* eslint-disable no-restricted-properties */\n\n/** normalize\n * This lets us translate a value from one scale to another.\n *\n * @param value - Our initial value to translate\n * @param min - the current minimum value possible\n * @param max - the current maximum value possible\n * @param scaleMin - the min value of the scale we're translating to\n * @param scaleMax - the max value of the scale we're translating to\n * @returns the value on its new scale\n */\nexport function normalize(\n value: number,\n min: number,\n max: number,\n scaleMin = 0,\n scaleMax = 1,\n): number {\n // If the `min` and `max` are the same value, it means our dataset is flat.\n // For now, let's assume that flat data should be aligned to the bottom.\n if (min === max) {\n return scaleMin;\n }\n\n return scaleMin + (value - min) * (scaleMax - scaleMin) / (max - min);\n}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\n/** moveTo\n * the coordinate that lies at a midpoint between 2 lines, based on the radius\n *\n * @param to - Our initial point\n * @param to.x - The x value of our initial point\n * @param to.y - The y value of our initial point\n * @param from - Our final point\n * @param from.x - The x value of our final point\n * @param from.y - The y value of our final point\n * @param radius - The distance away from the final point\n * @returns an object holding the x/y coordinates of the midpoint.\n */\nexport function moveTo(to: Point, from: Point, radius: number): Point {\n const length = Math.sqrt((to.x - from.x) * (to.x - from.x) + (to.y - from.y) * (to.y - from.y));\n const unitVector = { x: (to.x - from.x) / length, y: (to.y - from.y) / length };\n\n return {\n x: from.x + unitVector.x * radius,\n y: from.y + unitVector.y * radius,\n };\n}\n\n/** getDistanceBetween\n * Simple formula derived from pythagoras to calculate the distance between\n * 2 points on a plane.\n *\n * @param p1 - Our initial point\n * @param p1.x - The x value of our initial point\n * @param p1.y - The y value of our initial point\n * @param p2 - Our final point\n * @param p2.x - The x value of our final point\n * @param p2.y - The y value of our final point\n * @returns the distance between the points.\n */\nexport const getDistanceBetween = (p1: Point, p2: Point): number =>\n Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n\n/** checkForCollinearPoints\n * Figure out if the midpoint fits perfectly on a line between the two others.\n *\n * @param p1 - Our initial point\n * @param p1.x - The x value of our initial point\n * @param p1.y - The y value of our initial point\n * @param p2 - Our mid-point\n * @param p2.x - The x value of our mid-point\n * @param p2.y - The y value of our mid-point\n * @param p3 - Our final point\n * @param p3.x - The x value of our final point\n * @param p3.y - The y value of our final point\n * @returns whether or not p2 sits on the line between p1 and p3.\n */\nexport const checkForCollinearPoints = (p1: Point, p2: Point, p3: Point): boolean =>\n (p1.y - p2.y) * (p1.x - p3.x) === (p1.y - p3.y) * (p1.x - p2.x);\n","import {\n checkForCollinearPoints,\n getDistanceBetween,\n moveTo,\n Point,\n} from './math.helpers';\n\nexport const buildLinearPath = (data: Point[]) =>\n data.reduce((path, point, index) => {\n // The very first instruction needs to be a \"move\".\n // The rest will be a \"line\".\n const isFirstInstruction = index === 0;\n const instruction = isFirstInstruction ? 'M' : 'L';\n\n return `${path}${instruction} ${point.x},${point.y}\\n`;\n }, '');\n\nexport function buildSmoothPath(data: Point[], radius: number): string {\n const [firstPoint, ...otherPoints] = data;\n\n return otherPoints.reduce((path, point, index) => {\n const next = otherPoints[index + 1];\n const prev = otherPoints[index - 1] || firstPoint;\n\n const isCollinear = next && checkForCollinearPoints(prev, point, next);\n\n if (!next || isCollinear) {\n // The very last line in the sequence can just be a regular line.\n return `${path}\\nL ${point.x},${point.y}`;\n }\n\n const distanceFromPrev = getDistanceBetween(prev, point);\n const distanceFromNext = getDistanceBetween(next, point);\n const threshold = Math.min(distanceFromPrev, distanceFromNext);\n\n const isTooCloseForRadius = threshold / 2 < radius;\n\n const radiusForPoint = isTooCloseForRadius ? threshold / 2 : radius;\n\n const before = moveTo(prev, point, radiusForPoint);\n const after = moveTo(next, point, radiusForPoint);\n\n return [\n path,\n `L ${before.x},${before.y}`,\n `S ${point.x},${point.y} ${after.x},${after.y}`,\n ].join('\\n');\n }, `M ${firstPoint.x},${firstPoint.y}`);\n}\n","export const generateId = () => Math.round(Math.random() * Math.pow(10, 16));\n","import { normalize } from '../helpers/math.helpers';\n\nexport function normalizeDataset(\n data: number[],\n minX: number,\n maxX: number,\n minY: number,\n maxY: number,\n): Array<{ x: number; y: number }> {\n // For the X axis, we want to normalize it based on its index in the array.\n // For the Y axis, we want to normalize it based on the element's value.\n //\n // X axis is easy: just evenly-space each item in the array.\n // For the Y axis, we first need to find the min and max of our array,\n // and then normalize those values between 0 and 1.\n const boundariesX = { min: 0, max: data.length - 1 };\n const boundariesY = { min: Math.min(...data), max: Math.max(...data) };\n\n const normalizedData = data.map((point, index) => ({\n x: normalize(index, boundariesX.min, boundariesX.max, minX, maxX),\n y: normalize(point, boundariesY.min, boundariesY.max, minY, maxY),\n }));\n\n // According to the SVG spec, paths with a height/width of `0` can't have\n // linear gradients applied. This means that our lines are invisible when\n // the dataset is flat (eg. [0, 0, 0, 0]).\n //\n // The hacky solution is to apply a very slight offset to the first point of\n // the dataset. As ugly as it is, it's the best solution we can find (there\n // are ways within the SVG spec of changing it, but not without causing\n // breaking changes).\n if (boundariesY.min === boundariesY.max) {\n normalizedData[0].y += 0.0001;\n }\n\n return normalizedData;\n}\n","import { animate, keyframes, state, style, transition, trigger } from '@angular/animations';\nimport { Component, ElementRef, Input, OnChanges, ViewChild } from '@angular/core';\n\nimport { buildLinearPath, buildSmoothPath } from '../helpers/DOM.helpers';\nimport { normalize } from '../helpers/math.helpers';\nimport { generateId } from '../helpers/misc.helpers';\nimport { normalizeDataset } from './trend.helpers';\n\n@Component({\n selector: 'ngx-trend',\n template: `\n <svg\n *ngIf=\"data && data.length >= 2\"\n [attr.width]=\"svgWidth\"\n [attr.height]=\"svgHeight\"\n [attr.stroke]=\"stroke\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke-linecap]=\"strokeLinecap\"\n [attr.viewBox]=\"viewBox\"\n [attr.preserveAspectRatio]=\"preserveAspectRatio\"\n >\n <defs *ngIf=\"gradient && gradient.length\">\n <linearGradient [attr.id]=\"gradientId\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <stop\n *ngFor=\"let g of gradientTrimmed\"\n [attr.key]=\"g.idx\"\n [attr.offset]=\"g.offset\"\n [attr.stop-color]=\"g.stopColor\"\n />\n </linearGradient>\n </defs>\n <path\n fill=\"none\"\n #pathEl\n [attr.stroke]=\"pathStroke\"\n [attr.d]=\"d\"\n [@pathAnimaiton]=\"{\n value: animationState,\n params: {\n autoDrawDuration: autoDrawDuration,\n autoDrawEasing: autoDrawEasing,\n lineLength: lineLength\n }\n }\"\n />\n </svg>\n `,\n animations: [\n trigger('pathAnimaiton', [\n state('inactive', style({ display: 'none' })),\n transition('* => active', [\n style({ display: 'initial' }),\n // We do the animation using the dash array/offset trick\n // https://css-tricks.com/svg-line-animation-works/\n animate(\n '{{ autoDrawDuration }}ms {{ autoDrawEasing }}',\n keyframes([\n style({\n 'stroke-dasharray': '{{ lineLength }}px',\n 'stroke-dashoffset': '{{ lineLength }}px',\n }),\n style({\n 'stroke-dasharray': '{{ lineLength }}px',\n 'stroke-dashoffset': 0,\n }),\n ]),\n ),\n // One unfortunate side-effect of the auto-draw is that the line is\n // actually 1 big dash, the same length as the line itself. If the\n // line length changes (eg. radius change, new data), that dash won't\n // be the same length anymore. We can fix that by removing those\n // properties once the auto-draw is completed.\n style({\n 'stroke-dashoffset': '',\n 'stroke-dasharray': '',\n }),\n ]),\n ]),\n ],\n})\nexport class TrendComponent implements OnChanges {\n id: number;\n @Input() data?: Array<(number | { value: number })>;\n @Input() smooth?: boolean;\n @Input() autoDraw = false;\n @Input() autoDrawDuration = 2000;\n @Input() autoDrawEasing = 'ease';\n @Input() width?: number;\n @Input() height?: number;\n @Input() padding = 8;\n @Input() radius = 10;\n @Input() stroke = 'black';\n @Input() strokeLinecap = '';\n @Input() strokeWidth = 1;\n @Input() gradient: string[] = [];\n @Input() preserveAspectRatio?: string;\n @Input() svgHeight: string | number = '25%';\n @Input() svgWidth: string | number = '100%';\n @ViewChild('pathEl') pathEl!: ElementRef;\n gradientTrimmed!: Array<{ idx: number; stopColor: string; offset: number }>;\n d: any;\n viewBox!: string;\n pathStroke: any;\n gradientId: string;\n lineLength!: number;\n animationState = '';\n\n constructor() {\n this.id = generateId();\n this.gradientId = `ngx-trend-vertical-gradient-${this.id}`;\n }\n ngOnChanges(): void {\n // We need at least 2 points to draw a graph.\n if (!this.data || this.data.length < 2) {\n return;\n }\n\n // `data` can either be an array of numbers:\n // [1, 2, 3]\n // or, an array of objects containing a value:\n // [{ value: 1 }, { value: 2 }, { value: 3 }]\n //\n // For now, we're just going to convert the second form to the first.\n // Later on, if/when we support tooltips, we may adjust.\n const plainValues = this.data.map(point => {\n if (typeof point === 'number') {\n return point;\n }\n return point.value;\n });\n\n // Our viewbox needs to be in absolute units, so we'll default to 300x75\n // Our SVG can be a %, though; this is what makes it scalable.\n // By defaulting to percentages, the SVG will grow to fill its parent\n // container, preserving a 1/4 aspect ratio.\n const viewBoxWidth = this.width || 300;\n const viewBoxHeight = this.height || 75;\n this.svgWidth = this.width || '100%';\n this.svgHeight = this.height || '25%';\n this.viewBox = `0 0 ${viewBoxWidth} ${viewBoxHeight}`;\n const root = location.href.split(location.hash || '#')[0];\n this.pathStroke =\n this.gradient && this.gradient.length ? `url('${root}#${this.gradientId}')` : undefined;\n\n this.gradientTrimmed = this.gradient\n .slice()\n .reverse()\n .map((val, idx) => {\n return {\n idx,\n stopColor: val,\n offset: normalize(idx, 0, this.gradient.length - 1 || 1),\n };\n });\n\n const normalizedValues = normalizeDataset(\n plainValues,\n this.padding,\n viewBoxWidth - this.padding,\n // NOTE: Because SVGs are indexed from the top left, but most data is\n // indexed from the bottom left, we're inverting the Y min/max.\n viewBoxHeight - this.padding,\n this.padding,\n );\n\n if (this.autoDraw && this.animationState !== 'active') {\n this.animationState = 'inactive';\n setTimeout(() => {\n this.lineLength = this.pathEl.nativeElement.getTotalLength();\n this.animationState = 'active';\n });\n }\n\n this.d = this.smooth\n ? buildSmoothPath(normalizedValues, this.radius)\n : buildLinearPath(normalizedValues);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { TrendComponent } from './trend.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [TrendComponent],\n declarations: [TrendComponent],\n})\nexport class TrendModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAAA;AAEA;;;;;;;;;;SAUgB,SAAS,CACvB,KAAa,EACb,GAAW,EACX,GAAW,EACX,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,CAAC;;;IAIZ,IAAI,GAAG,KAAK,GAAG,EAAE;QACf,OAAO,QAAQ,CAAC;KACjB;IAED,OAAO,QAAQ,GAAG,CAAC,KAAK,GAAG,GAAG,KAAK,QAAQ,GAAG,QAAQ,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;AACxE,CAAC;AAOD;;;;;;;;;;;;SAYgB,MAAM,CAAC,EAAS,EAAE,IAAW,EAAE,MAAc;IAC3D,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChG,MAAM,UAAU,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,MAAM,EAAE,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UAAU,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;wBAC7C,UAAU,CAAC,aAAa,EAAE;4BACxB,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;;;4BAG7B,OAAO,CACL,+CAA+C,EAC/C,SAAS,CAAC;gCACR,KAAK,CAAC;oCACJ,kBAAkB,EAAE,oBAAoB;oCACxC,mBAAmB,EAAE,oBAAoB;iCAC1C,CAAC;gCACF,KAAK,CAAC;oCACJ,kBAAkB,EAAE,oBAAoB;oCACxC,mBAAmB,EAAE,CAAC;iCACvB,CAAC;6BACH,CAAC,CACH;;;;;;4BAMD,KAAK,CAAC;gCACJ,mBAAmB,EAAE,EAAE;gCACvB,kBAAkB,EAAE,EAAE;6BACvB,CAAC;yBACH,CAAC;qBACH,CAAC;iBACH;aACF;;;;mBAGE,KAAK;qBACL,KAAK;uBACL,KAAK;+BACL,KAAK;6BACL,KAAK;oBACL,KAAK;qBACL,KAAK;sBACL,KAAK;qBACL,KAAK;qBACL,KAAK;4BACL,KAAK;0BACL,KAAK;uBACL,KAAK;kCACL,KAAK;wBACL,KAAK;uBACL,KAAK;qBACL,SAAS,SAAC,QAAQ;;;MCxFR,WAAW;;;YALvB,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,OAAO,EAAE,CAAC,cAAc,CAAC;gBACzB,YAAY,EAAE,CAAC,cAAc,CAAC;aAC/B;;;ACTD;;;;;;"}
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"TrendComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":8,"character":1},"arguments":[{"selector":"ngx-trend","template":"\n <svg\n *ngIf=\"data && data.length >= 2\"\n [attr.width]=\"svgWidth\"\n [attr.height]=\"svgHeight\"\n [attr.stroke]=\"stroke\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke-linecap]=\"strokeLinecap\"\n [attr.viewBox]=\"viewBox\"\n [attr.preserveAspectRatio]=\"preserveAspectRatio\"\n >\n <defs *ngIf=\"gradient && gradient.length\">\n <linearGradient [attr.id]=\"gradientId\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <stop\n *ngFor=\"let g of gradientTrimmed\"\n [attr.key]=\"g.idx\"\n [attr.offset]=\"g.offset\"\n [attr.stop-color]=\"g.stopColor\"\n />\n </linearGradient>\n </defs>\n <path\n fill=\"none\"\n #pathEl\n [attr.stroke]=\"pathStroke\"\n [attr.d]=\"d\"\n [@pathAnimaiton]=\"{\n value: animationState,\n params: {\n autoDrawDuration: autoDrawDuration,\n autoDrawEasing: autoDrawEasing,\n lineLength: lineLength\n }\n }\"\n />\n </svg>\n ","animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":48,"character":4},"arguments":["pathAnimaiton",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":49,"character":6},"arguments":["inactive",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":49,"character":24},"arguments":[{"display":"none"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":50,"character":6},"arguments":["* => active",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":51,"character":8},"arguments":[{"display":"initial"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":54,"character":8},"arguments":["{{ autoDrawDuration }}ms {{ autoDrawEasing }}",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"keyframes","line":56,"character":10},"arguments":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":57,"character":12},"arguments":[{"stroke-dasharray":"{{ lineLength }}px","stroke-dashoffset":"{{ lineLength }}px","$quoted$":["stroke-dasharray","stroke-dashoffset"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":61,"character":12},"arguments":[{"stroke-dasharray":"{{ lineLength }}px","stroke-dashoffset":0,"$quoted$":["stroke-dasharray","stroke-dashoffset"]}]}]]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":72,"character":8},"arguments":[{"stroke-dashoffset":"","stroke-dasharray":"","$quoted$":["stroke-dashoffset","stroke-dasharray"]}]}]]}]]}]}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":82,"character":3}}]}],"smooth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":83,"character":3}}]}],"autoDraw":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":84,"character":3}}]}],"autoDrawDuration":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":85,"character":3}}]}],"autoDrawEasing":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":86,"character":3}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":87,"character":3}}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":88,"character":3}}]}],"padding":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":89,"character":3}}]}],"radius":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":90,"character":3}}]}],"stroke":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":91,"character":3}}]}],"strokeLinecap":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":92,"character":3}}]}],"strokeWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":3}}]}],"gradient":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":3}}]}],"preserveAspectRatio":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":3}}]}],"svgHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":96,"character":3}}]}],"svgWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":97,"character":3}}]}],"pathEl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":98,"character":3},"arguments":["pathEl"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnChanges":[{"__symbolic":"method"}]}},"TrendModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":6,"character":12}],"exports":[{"__symbolic":"reference","name":"TrendComponent"}],"declarations":[{"__symbolic":"reference","name":"TrendComponent"}]}]}],"members":{}}},"origins":{"TrendComponent":"./trend/trend.component","TrendModule":"./trend/trend.module"},"importAs":"ngx-trend"}