Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.xScaleMin,
this.xScaleMax,
this.yScaleMin,
this.yScaleMax
);
}
// update custom colors to use error bars
this.customColors.push(
{name: 'error', value: this.errorBarColor}
);
this.combinedSeries = this.results;
super.update();
this.dims = calculateViewDimensions({
height: this.height,
legendType: this.schemeType,
margins: this.margin,
showLegend: this.legend,
showXAxis: this.xAxis,
showXLabel: this.showXAxisLabel,
showYAxis: this.yAxis,
showYLabel: this.showYAxisLabel,
width: this.width,
xAxisHeight: this.xAxisHeight,
yAxisWidth: this.yAxisWidth,
});
if (!this.yAxis) {
this.legendSpacing = 0;
} else if (this.showYAxisLabel && this.yAxis) {
this.zone.run(() => {
this.dims = calculateViewDimensions({
width: this.width,
height: this.height,
margins: this.margin,
showLegend: this.legend
});
this.seriesDomain = this.getSeriesDomain();
this.setColors();
this.legendOptions = this.getLegendOptions();
this.createGraph();
this.updateTransform();
this.initialized = true;
});
}
update(): void {
super.update();
this.dims = calculateViewDimensions({
width: this.width,
height: this.height,
margins: this.margin,
showXAxis: this.xAxis,
showYAxis: this.yAxis,
xAxisHeight: this.xAxisHeight,
yAxisWidth: this.yAxisWidth,
showXLabel: this.showXAxisLabel,
showYLabel: this.showYAxisLabel,
showLegend: this.legend,
legendType: this.schemeType,
legendPosition: this.legendPosition
});
if (this.timeline) {
this.dims.height -= (this.timelineHeight + this.margin[2] + this.timelinePadding);
update(): void {
super.update();
this.dims = calculateViewDimensions({
width: this.width,
height: this.height,
margins: this.margin,
showXAxis: this.xAxis,
showYAxis: this.yAxis,
xAxisHeight: this.xAxisHeight,
yAxisWidth: this.yAxisWidth,
showLegend: false,
legendType: 'time'
});
this.xDomain = this.getXDomain();
this.yDomain = this.getYDomain();
this.timeScale = this.getTimeScale(this.xDomain, this.dims.width);
this.yScale = this.getYScale(this.yDomain, this.dims.height);
this.transform = `translate(${ this.dims.xOffset } , ${ this.margin[0] })`;
this.transform2 = `translate(0, ${ this.dims.height + 15})`;
update(): void {
super.update();
if (!this.yAxis) {
this.legendSpacing = 0;
} else {
this.legendSpacing = 50;
}
this.dims = calculateViewDimensions({
width: this.legend ? this.width - this.legendSpacing : this.width,
height: this.height,
margins: this.margin,
showXAxis: this.xAxis,
showYAxis: this.yAxis,
xAxisHeight: this.xAxisHeight,
yAxisWidth: this.yAxisWidth,
showXLabel: this.showXAxisLabel,
showYLabel: this.showYAxisLabel,
showLegend: this.legend,
legendType: this.schemeType,
});
this.xScale = this.getXScale();
this.yScale = this.getYScale();
update(): void {
super.update();
this.dims = calculateViewDimensions({
width: this.width,
height: this.height,
margins: this.margin,
showXAxis: this.xAxis,
showYAxis: this.yAxis,
xAxisHeight: this.xAxisHeight,
yAxisWidth: this.yAxisWidth,
showXLabel: this.showXAxisLabel,
showYLabel: this.showYAxisLabel,
showLegend: this.legend,
legendType: this.schemeType,
legendPosition: this.legendPosition
});
if (!this.yAxis) {
this.legendSpacing = 0;
this.zone.run(function () {
_this.dims = calculateViewDimensions({
width: _this.width,
height: _this.height,
margins: _this.margin,
showLegend: _this.legend,
});
_this.seriesDomain = _this.getSeriesDomain();
_this.setColors();
_this.legendOptions = _this.getLegendOptions();
_this.createGraph();
_this.updateTransform();
_this.initialized = true;
});
};
this.zone.run(function () {
_this.dims = calculateViewDimensions({
width: _this.width,
height: _this.height,
margins: _this.margin,
showLegend: _this.legend
});
_this.seriesDomain = _this.getSeriesDomain();
_this.setColors();
_this.legendOptions = _this.getLegendOptions();
_this.createGraph();
_this.updateTransform();
_this.initialized = true;
});
};