diff --git a/src/theme-fiveThirtyEight.ts b/src/theme-fiveThirtyEight.ts deleted file mode 100644 index f2b08836..00000000 --- a/src/theme-fiveThirtyEight.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { Config } from 'vega'; - -const markColor = '#30a2da'; -const axisColor = '#cbcbcb'; -const backgroundColor = '#f0f0f0'; -const blackTitle = '#1c1c1c'; - -const fiveThirtyEightTheme: Config = { - arc: { fill: markColor }, - area: { fill: markColor }, - - axisBand: { - grid: false, - }, - - axisBottom: { - domain: false, - domainColor: blackTitle, - domainWidth: 3, - grid: true, - gridColor: axisColor, - gridWidth: 1, - labelFontSize: 10, - labelPadding: 4, - tickColor: axisColor, - labelColor: axisColor, - tickSize: 10, - titleFontSize: 14, - titlePadding: 10, - }, - - axisLeft: { - domainColor: axisColor, - domainWidth: 1, - gridColor: axisColor, - gridWidth: 1, - grid: true, - labelFontSize: 10, - labelPadding: 4, - tickColor: axisColor, - labelColor: axisColor, - tickSize: 10, - ticks: true, - titleFontSize: 14, - titlePadding: 10, - }, - - axisRight: { - domainColor: blackTitle, - domainWidth: 1, - gridColor: axisColor, - gridWidth: 1, - grid: true, - labelFontSize: 10, - labelPadding: 4, - tickColor: axisColor, - labelColor: axisColor, - tickSize: 10, - ticks: true, - titleFontSize: 14, - titlePadding: 10, - }, - - axisTop: { - domain: false, - domainColor: blackTitle, - domainWidth: 3, - grid: true, - gridColor: axisColor, - gridWidth: 1, - labelFontSize: 10, - labelPadding: 4, - tickColor: axisColor, - labelColor: axisColor, - tickSize: 10, - titleFontSize: 14, - titlePadding: 10, - }, - - background: backgroundColor, - group: { - fill: backgroundColor, - }, - - legend: { - labelFontSize: 11, - labelColor: blackTitle, - padding: 1, - symbolSize: 30, - symbolType: 'square', - titleFontSize: 14, - titlePadding: 10, - titleColor: blackTitle - }, - - line: { - stroke: markColor, - strokeWidth: 2, - }, - - path: { stroke: markColor, strokeWidth: 0.5 }, - rect: { fill: markColor }, - - range: { - category: [ - '#30a2da', - '#fc4f30', - '#e5ae38', - '#6d904f', - '#8b8b8b', - '#b96db8', - '#ff9e27', - '#56cc60', - '#52d2ca', - '#52689e', - '#545454', - '#9fe4f8', - ], - - diverging: [ - '#cc0020', - '#e77866', - '#f6e7e1', - '#d6e8ed', - '#91bfd9', - '#1d78b5', - ], - heatmap: ['#d6e8ed', '#cee0e5', '#91bfd9', '#549cc6', '#1d78b5'], - }, - - symbol: { - opacity: 0.5, - shape: 'circle', - size: 40, - filled: True - }, - - shape: { stroke: markColor }, - - style: { - bar: { - binSpacing: 2, - fill: markColor, - stroke: null, - }, - }, - - title: { - anchor: 'start', - fontSize: 24, - fontWeight: 600, - offset: 20, - }, -}; - -export default fiveThirtyEightTheme; diff --git a/src/theme-fivethirtyeight.ts b/src/theme-fivethirtyeight.ts index 57d3c5ee..2a4295a9 100644 --- a/src/theme-fivethirtyeight.ts +++ b/src/theme-fivethirtyeight.ts @@ -3,6 +3,7 @@ import { Config } from './config'; const markColor = '#30a2da'; const axisColor = '#cbcbcb'; const backgroundColor = '#f0f0f0'; +const blackTitle = '#1c1c1c'; const fivethirtyeighttheme: Config = { arc: { fill: markColor }, @@ -14,14 +15,15 @@ const fivethirtyeighttheme: Config = { axisBottom: { domain: false, - domainColor: 'black', + domainColor: blackTitle, domainWidth: 3, grid: true, gridColor: axisColor, gridWidth: 1, - labelFontSize: 12, + labelFontSize: 10, labelPadding: 4, tickColor: axisColor, + labelColor: axisColor, tickSize: 10, titleFontSize: 14, titlePadding: 10, @@ -32,9 +34,11 @@ const fivethirtyeighttheme: Config = { domainWidth: 1, gridColor: axisColor, gridWidth: 1, - labelFontSize: 12, + grid: true, + labelFontSize: 10, labelPadding: 4, tickColor: axisColor, + labelColor: axisColor, tickSize: 10, ticks: true, titleFontSize: 14, @@ -42,13 +46,15 @@ const fivethirtyeighttheme: Config = { }, axisRight: { - domainColor: axisColor, + domainColor: blackTitle, domainWidth: 1, gridColor: axisColor, gridWidth: 1, - labelFontSize: 12, + grid: true, + labelFontSize: 10, labelPadding: 4, tickColor: axisColor, + labelColor: axisColor, tickSize: 10, ticks: true, titleFontSize: 14, @@ -57,14 +63,15 @@ const fivethirtyeighttheme: Config = { axisTop: { domain: false, - domainColor: 'black', + domainColor: blackTitle, domainWidth: 3, grid: true, gridColor: axisColor, gridWidth: 1, - labelFontSize: 12, + labelFontSize: 10, labelPadding: 4, tickColor: axisColor, + labelColor: axisColor, tickSize: 10, titleFontSize: 14, titlePadding: 10, @@ -77,11 +84,13 @@ const fivethirtyeighttheme: Config = { legend: { labelFontSize: 11, + labelColor: blackTitle, padding: 1, symbolSize: 30, symbolType: 'square', titleFontSize: 14, titlePadding: 10, + titleColor: blackTitle }, line: { @@ -90,7 +99,6 @@ const fivethirtyeighttheme: Config = { }, path: { stroke: markColor, strokeWidth: 0.5 }, - point: { filled: true }, rect: { fill: markColor }, range: { @@ -121,10 +129,10 @@ const fivethirtyeighttheme: Config = { }, symbol: { - opacity: 1, + opacity: 0.5, shape: 'circle', size: 40, - strokeWidth: 1, + filled: True }, shape: { stroke: markColor }, @@ -145,4 +153,4 @@ const fivethirtyeighttheme: Config = { }, }; -export default fivethirtyeighttheme; +export default fivethirtyeighttheme; \ No newline at end of file