Skip to content

Instantly share code, notes, and snippets.

@laurence001
Last active October 14, 2019 12:06
Show Gist options
  • Save laurence001/05a1ff7a3ebf84c44077a979d225e5dd to your computer and use it in GitHub Desktop.
Save laurence001/05a1ff7a3ebf84c44077a979d225e5dd to your computer and use it in GitHub Desktop.
Theme for Highcharter package (R)
greentheme <- hc_theme (
colors = c('#019875', '#52a654', '#92ae29', '#b5ae0d', '#d9ac00', '#ffa600'), #array of colors
chart = list(
backgroundColor = '#FFFFFF'
),
loading = list (
hideDuration = 1000,
showDuration = 1000
),
title = list(
style = list(
color = '#000000',
fontFamily = "Raleway",
fontSize = '20px',
fontWeight = 'bold'
)
),
subtitle = list(
style = list(
color = '#000000',
fontFamily = "Raleway",
fontSize = '18px'
)
),
legend = list( #bottom of the chart
itemStyle = list(
fontFamily = 'Open Sans',
color = 'black',
fontSize = '13px'
)
),
xAxis = list (
labels = list(
style = list(
fontFamily = 'Raleway',
fontSize = '14px',
fontWeight = 'normal'
)
)
),
yAxis = list (
labels = list (
style = list(
fontFamily = 'Raleway',
fontSize = '14px'
)
)
),
itemHoverStyle = list(
color = 'gray'
),
label = list (
style = list (
fontWeight = 400,
fontSize = '14px'
)
),
plotOptions = list(
pie = list ( #only for pie charts
dataLabels = list(
style = list (
fontSize = '16px',
fontFamily = 'Raleway',
fontWeight = 'normal'
)
)
)
),
tooltip = list (
style = list(
fontFamily = 'Raleway',
fontSize = '15px'
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment