Skip to content

Commit

Permalink
chore(*): upgrade deps and fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
amcdnl committed Sep 11, 2017
1 parent 999c474 commit 31a4ae3
Show file tree
Hide file tree
Showing 15 changed files with 1,975 additions and 903 deletions.
6 changes: 3 additions & 3 deletions demo/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';

document.addEventListener('DOMContentLoaded', () => {
platformBrowserDynamic()
document.addEventListener('DOMContentLoaded', () => {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
});
});
26 changes: 12 additions & 14 deletions demo/combo-chart/combo-chart.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ import {
transition
} from '@angular/animations';

import { NgxChartsModule, BaseChartComponent, LineComponent, LineSeriesComponent } from '../../src';
import {
NgxChartsModule, BaseChartComponent, LineComponent, LineSeriesComponent,
calculateViewDimensions, ViewDimensions, ColorHelper
} from '../../src';
import { area, line, curveLinear } from 'd3-shape';
import { scaleBand, scaleLinear, scalePoint, scaleTime } from 'd3-scale';
import { calculateViewDimensions, ViewDimensions, ColorHelper } from '../../src';

@Component({
selector: 'combo-chart-component',
Expand Down Expand Up @@ -249,9 +251,7 @@ export class ComboChartComponent extends BaseChartComponent {
this.transform = `translate(${ this.dims.xOffset } , ${ this.margin[0] })`;
}

// line scale

deactivateAll() {
deactivateAll() {
this.activeEntries = [...this.activeEntries];
for (const entry of this.activeEntries) {
this.deactivate.emit({ value: entry, entries: [] });
Expand All @@ -265,7 +265,7 @@ export class ComboChartComponent extends BaseChartComponent {
this.deactivateAll();
}

updateHoveredVertical(item): void {
updateHoveredVertical(item): void {
this.hoveredVertical = item.value;
this.deactivateAll();
}
Expand All @@ -278,22 +278,22 @@ export class ComboChartComponent extends BaseChartComponent {

getSeriesDomain(): any[] {
this.combinedSeries = this.lineChart.slice(0);
this.combinedSeries.push(
{name: this.yAxisLabel,
this.combinedSeries.push({
name: this.yAxisLabel,
series: this.results
});
return this.combinedSeries.map(d => d.name);
}

isDate(value): boolean {
isDate(value): boolean {
if (value instanceof Date) {
return true;
}

return false;
}

getScaleType(values): string {
getScaleType(values): string {
let date = true;
let num = true;

Expand Down Expand Up @@ -400,18 +400,16 @@ export class ComboChartComponent extends BaseChartComponent {
}

return scale;
}
}

getYScaleLine(domain, height): any {
getYScaleLine(domain, height): any {
const scale = scaleLinear()
.range([height, 0])
.domain(domain);

return this.roundDomains ? scale.nice() : scale;
}

// bar scales

getXScale(): any {
this.xDomain = this.getXDomain();
const spacing = this.xDomain.length / (this.dims.width / this.barPadding + 1);
Expand Down
14 changes: 7 additions & 7 deletions demo/combo-chart/combo-series-vertical.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
OnChanges,
ChangeDetectionStrategy
} from '@angular/core';
import {
trigger,
state,
style,
animate,
transition
} from '@angular/animations';
import {
trigger,
state,
style,
animate,
transition
} from '@angular/animations';
import { formatLabel } from '../../src/common/label.helper';

@Component({
Expand Down
Loading

0 comments on commit 31a4ae3

Please sign in to comment.