Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

Commit

Permalink
Rename patterns to tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Castelain authored and jbalsas committed Dec 19, 2017
1 parent f3a4ec7 commit fcf01b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/clay-charts/src/ChartBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const DEFAULT_LINE_CASSES = [
'bb-line-dashed-4-4',
];

const DEFAULT_PATTERNS = [
const DEFAULT_TILES = [
'circles',
'diagonal-left-large',
'diagonal-left-small',
Expand All @@ -60,12 +60,12 @@ const ChartBase = {
attached: function() {
const config = this.constructChartConfig_();

const existingPatterns = DEFAULT_PATTERNS.filter(val => {
const existingTiles = DEFAULT_TILES.filter(val => {
return document.querySelector(`#${val}`);
}).map(val => document.querySelector(`#${val}`));

if (existingPatterns.length > 0) {
config.color.tiles = () => existingPatterns;
if (existingTiles.length > 0) {
config.color.tiles = () => existingTiles;
}

this.bbChart = bb.generate(config);
Expand Down

0 comments on commit fcf01b4

Please sign in to comment.