Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace orange with sinebow color scheme #66

Merged
merged 1 commit into from
Jun 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addon/components/simple-chart-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
scaleLinear,
scaleSequential
} from 'd3-scale';
import { interpolateOranges } from 'd3-scale-chromatic';
import { interpolateSinebow } from 'd3-scale-chromatic';
import { A } from '@ember/array';

export default Component.extend(ChartProperties, {
Expand All @@ -23,7 +23,7 @@ export default Component.extend(ChartProperties, {
const dataOrArray = data?data:[{data: 1, label: '', empty: true}];
const svg = select(this.element);
const values = A(dataOrArray).mapBy('data');
const color = scaleSequential(interpolateOranges).domain([0, Math.max(...values)]);
const color = scaleSequential(interpolateSinebow).domain([0, Math.max(...values)]);

const yScale = scaleLinear()
.domain([0, Math.max(...dataOrArray.map(d => d.data))])
Expand Down
4 changes: 2 additions & 2 deletions addon/components/simple-chart-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ChartProperties from 'ember-simple-charts/mixins/chart-properties';

import { select } from 'd3-selection';
import { hierarchy, cluster } from 'd3-hierarchy';
import { interpolateOranges } from 'd3-scale-chromatic';
import { interpolateSinebow } from 'd3-scale-chromatic';
import { scaleSequential } from 'd3-scale';
export default Component.extend(ChartProperties, {
classNames: ['simple-chart-cluster'],
Expand All @@ -25,7 +25,7 @@ export default Component.extend(ChartProperties, {
const clusterLayout = cluster().size([height - 15, width - 15]);
const root = hierarchy(data);
clusterLayout(root);
const color = scaleSequential(interpolateOranges).domain([0, Math.max(root.height)]);
const color = scaleSequential(interpolateSinebow).domain([0, Math.max(root.height)]);

svg.selectAll('.chart').remove();
const chart = svg.append('g')
Expand Down
4 changes: 2 additions & 2 deletions addon/components/simple-chart-donut.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ChartProperties from 'ember-simple-charts/mixins/chart-properties';

import { select } from 'd3-selection';
import { scaleSequential } from 'd3-scale';
import { interpolateOranges } from 'd3-scale-chromatic';
import { interpolateSinebow } from 'd3-scale-chromatic';
import { arc, pie } from 'd3-shape';
import { easeLinear } from 'd3-ease';
import { interpolate } from 'd3-interpolate';
Expand All @@ -27,7 +27,7 @@ export default Component.extend(ChartProperties, {
const click = get(this, 'click');
const isClickable = get(this, 'isClickable');
const values = A(dataOrArray).mapBy('data');
const color = scaleSequential(interpolateOranges).domain([0, Math.max(...values)]);
const color = scaleSequential(interpolateSinebow).domain([0, Math.max(...values)]);
const donutWidth = width * .2;

let createArc = arc().innerRadius(radius - donutWidth).outerRadius(radius);
Expand Down
4 changes: 2 additions & 2 deletions addon/components/simple-chart-horz-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
scaleLinear,
scaleSequential
} from 'd3-scale';
import { interpolateOranges } from 'd3-scale-chromatic';
import { interpolateSinebow } from 'd3-scale-chromatic';
import { A } from '@ember/array';

export default Component.extend(ChartProperties, {
Expand All @@ -23,7 +23,7 @@ export default Component.extend(ChartProperties, {
const dataOrArray = data?data:[{data: 1, label: '', empty: true}];
const svg = select(this.element);
const values = A(dataOrArray).mapBy('data');
const color = scaleSequential(interpolateOranges).domain([0, Math.max(...values)]);
const color = scaleSequential(interpolateSinebow).domain([0, Math.max(...values)]);

const xScale = scaleLinear()
.domain([0, Math.max(...dataOrArray.map(d => d.data))])
Expand Down
4 changes: 2 additions & 2 deletions addon/components/simple-chart-pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ChartProperties from 'ember-simple-charts/mixins/chart-properties';

import { select } from 'd3-selection';
import { scaleSequential } from 'd3-scale';
import { interpolateOranges } from 'd3-scale-chromatic';
import { interpolateSinebow } from 'd3-scale-chromatic';
import { arc, pie } from 'd3-shape';
import { easeLinear } from 'd3-ease';
import { interpolate } from 'd3-interpolate';
Expand All @@ -27,7 +27,7 @@ export default Component.extend(ChartProperties, {
const click = get(this, 'click');
const isClickable = get(this, 'isClickable');
const values = A(dataOrArray).mapBy('data');
const color = scaleSequential(interpolateOranges).domain([0, Math.max(...values)]);
const color = scaleSequential(interpolateSinebow).domain([0, Math.max(...values)]);

let createArc = arc().innerRadius(0).outerRadius(radius);
let createPie = pie().value(d => d.data).sort(null);
Expand Down