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

use tableu20 colors as default #989

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
30 changes: 20 additions & 10 deletions src/common/models/colors/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,26 @@
import { hsl, range, rgb } from "d3";

export const DEFAULT_SERIES_COLORS = [
"#2D95CA",
"#EFB925",
"#DA4E99",
"#4CC873",
"#745CBD",
"#EA7136",
"#E68EE0",
"#218C35",
"#B0B510",
"#904064"
"#4E79A7",
"#A0CBE8",
"#F28E2B",
"#FFBE7D",
"#59A14F",
"#8CD17D",
"#B6992D",
"#F1CE63",
"#499894",
"#86BCB6",
"#E15759",
"#FF9D9A",
"#79706E",
"#BAB0AC",
"#D37295",
"#FABFD2",
"#B07AA1",
"#D4A6C8",
"#9D7660",
"#D7B5A6"
];

export const DEFAULT_MAIN_COLOR = "#FF5900";
Expand Down
4 changes: 2 additions & 2 deletions src/common/utils/rules/split-adjustments.mocha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ describe("Split adjustment utilities", () => {
});

describe("adjustColorSplit", () => {
it("should adjust limit with predefined limits (5, 10)", () => {
it("should adjust limit with limits based on available colours", () => {
const dimension: Dimension = {
...createDimension("string", "foobar", $("foobar")),
limits: [42, 100]
};
const split = stringSplitCombine("foobar", { limit: 50 });
const adjusted = adjustColorSplit(split, dimension, SeriesList.fromSeries([]), DEFAULT_COLORS);

expect(adjusted.limit).to.be.equal(10);
expect(adjusted.limit).to.be.equal(20);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ export class UrlHashCon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