Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Component, ViewEncapsulation, OnInit } from '@angular/core';
import { colorSets } from '@swimlane/ngx-charts/release/utils/color-sets';
import * as shape from 'd3-shape';
import * as dsv from 'd3-dsv';
import { nest } from 'd3-collection';
import * as babyparse from 'babyparse';
import SvgSaver from 'svgsaver';
import chroma from 'chroma-js';
import { chartTypes } from './chartTypes';
import { gapminder } from './data';
const defaultOptions = {
view: [1000, 600],
colorScheme: colorSets.find(s => s.name === 'cool'),
schemeType: 'ordinal',
showLegend: true,
legendTitle: 'Legend',
gradient: false,
showXAxis: true,
showYAxis: true,
showXAxisLabel: true,
showYAxisLabel: true,
yAxisLabel: '',
xAxisLabel: '',
autoScale: true,
showGridLines: true,
rangeFillOpacity: 0.5,
roundDomains: false,
tooltipDisabled: false,
showSeriesOnHover: true,
import { Component, OnInit, Input, Output, EventEmitter, DoCheck, ChangeDetectionStrategy } from '@angular/core';
import { colorSets } from '@swimlane/ngx-charts/release/utils/color-sets';
import * as shape from 'd3-shape';
import * as babyparse from 'babyparse';
import * as _ from 'lodash';
import { chartTypes } from './chartTypes';
import { gapminder } from './data';
const defaultOptions = {
view: [900, 600],
colorScheme: colorSets.find(s => s.name === 'cool'),
schemeType: 'ordinal',
showLegend: true,
legendTitle: 'Legend',
gradient: false,
showXAxis: true,
showYAxis: true,
showXAxisLabel: true,
showYAxisLabel: true,
yAxisLabel: '',
xAxisLabel: '',
autoScale: true,
showGridLines: true,
rangeFillOpacity: 0.5,
roundDomains: false,
tooltipDisabled: false,
showSeriesOnHover: true,
import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
import * as shape from 'd3-shape';
import { colorSets } from '@swimlane/ngx-charts/release/utils/color-sets';
import { Chart } from '../../chart.class';
import { nest } from 'd3-collection';
import * as _ from 'lodash';
const defaultOptions = {
view: [900, 600],
colorScheme: colorSets.find(s => { if (s === undefined) return; else return s.name === 'cool' }),
schemeType: 'ordinal',
showLegend: true,
legendTitle: 'Legend',
gradient: false,
showXAxis: true,
showYAxis: true,
showXAxisLabel: true,
showYAxisLabel: true,
yAxisLabel: '',
xAxisLabel: '',
autoScale: true,
showGridLines: true,
rangeFillOpacity: 0.5,
roundDomains: false,
tooltipDisabled: false,
showSeriesOnHover: true,
setColorScheme(name) {
this.selectedColorScheme = name;
this.colorScheme = ngxChartsColorsets.find(s => s.name === name);
}
import {Component, OnInit, NgZone, Output, EventEmitter} from '@angular/core';
import {colorSets} from '@swimlane/ngx-charts/release/utils/color-sets';
import * as shape from 'd3-shape';
import * as chroma from 'chroma-js';
import {CustomChart, CustomChartType, CustomData} from '../models';
import {DataService} from '../../services/data.service';
import {toCapitalizedWords} from '../models';
import {customChartTypes} from './customChartTypes';
import {CollectedData} from '../../../shared/models/collected-data.model';
import {CollectedDataService} from '../../../core/services/collected-data.service';
const defaultOptions = {
view: undefined,
colorScheme: colorSets.find(s => s.name === 'cool'),
schemeType: 'ordinal',
showLegend: true,
legendTitle: 'Legend',
gradient: false,
showXAxis: true,
showYAxis: true,
showXAxisLabel: true,
showYAxisLabel: true,
yAxisLabel: '',
xAxisLabel: '',
autoScale: true,
showGridLines: true,
rangeFillOpacity: 0.5,
roundDomains: false,
tooltipDisabled: false,
showSeriesOnHover: true,