How to use the @swimlane/ngx-charts/release/utils/color-sets.colorSets.find function in @swimlane/ngx-charts

To help you get started, we’ve selected a few @swimlane/ngx-charts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github swimlane / ngx-charts-builder / src / app / app.component.ts View on Github external
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,
github WeAreOpenSourceProjects / NodeAngular / libs / slides / src / components / slides-editor-form / slides-editor / slide-card / slide-editor / charts-builder / charts-builder.component.ts View on Github external
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,
github WeAreOpenSourceProjects / NodeAngular / libs / charts / src / ngx-charts / ng-graph / ng-graph.component.ts View on Github external
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,
github viktorgullmark / exilence / ExilenceClient / src / app / authorize / components / income / income.component.ts View on Github external
setColorScheme(name) {
    this.selectedColorScheme = name;
    this.colorScheme = ngxChartsColorsets.find(s => s.name === name);
  }
github BinaryStudioAcademy / bsa-2018-watcher / frontend / src / app / dashboards / charts / chart-builder / chart-builder.component.ts View on Github external
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,