score:3
i had a similar doubt. then i went through the documentation to get this theme code .
and i put it before
highcharts.chart(....)
segment
the following is the theme code
highcharts.theme = {
colors: ['#2b908f', '#90ee7e', '#f45b5b', '#7798bf', '#aaeeee', '#ff0066',
'#eeaaee', '#55bf3b', '#df5353', '#7798bf', '#aaeeee'],
chart: {
backgroundcolor: {
lineargradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
stops: [
[0, '#2a2a2b'],
[1, '#3e3e40']
]
},
style: {
fontfamily: '\'unica one\', sans-serif'
},
plotbordercolor: '#606063'
},
title: {
style: {
color: '#e0e0e3',
texttransform: 'uppercase',
fontsize: '20px'
}
},
subtitle: {
style: {
color: '#e0e0e3',
texttransform: 'uppercase'
}
},
xaxis: {
gridlinecolor: '#707073',
labels: {
style: {
color: '#e0e0e3'
}
},
linecolor: '#707073',
minorgridlinecolor: '#505053',
tickcolor: '#707073',
title: {
style: {
color: '#a0a0a3'
}
}
},
yaxis: {
gridlinecolor: '#707073',
labels: {
style: {
color: '#e0e0e3'
}
},
linecolor: '#707073',
minorgridlinecolor: '#505053',
tickcolor: '#707073',
tickwidth: 1,
title: {
style: {
color: '#a0a0a3'
}
}
},
tooltip: {
backgroundcolor: 'rgba(0, 0, 0, 0.85)',
style: {
color: '#f0f0f0'
}
},
plotoptions: {
series: {
datalabels: {
color: '#b0b0b3'
},
marker: {
linecolor: '#333'
}
},
boxplot: {
fillcolor: '#505053'
},
candlestick: {
linecolor: 'white'
},
errorbar: {
color: 'white'
}
},
legend: {
itemstyle: {
color: '#e0e0e3'
},
itemhoverstyle: {
color: '#fff'
},
itemhiddenstyle: {
color: '#606063'
}
},
credits: {
style: {
color: '#666'
}
},
labels: {
style: {
color: '#707073'
}
},
drilldown: {
activeaxislabelstyle: {
color: '#f0f0f3'
},
activedatalabelstyle: {
color: '#f0f0f3'
}
},
navigation: {
buttonoptions: {
symbolstroke: '#dddddd',
theme: {
fill: '#505053'
}
}
},
// scroll charts
rangeselector: {
buttontheme: {
fill: '#505053',
stroke: '#000000',
style: {
color: '#ccc'
},
states: {
hover: {
fill: '#707073',
stroke: '#000000',
style: {
color: 'white'
}
},
select: {
fill: '#000003',
stroke: '#000000',
style: {
color: 'white'
}
}
}
},
inputboxbordercolor: '#505053',
inputstyle: {
backgroundcolor: '#333',
color: 'silver'
},
labelstyle: {
color: 'silver'
}
},
navigator: {
handles: {
backgroundcolor: '#666',
bordercolor: '#aaa'
},
outlinecolor: '#ccc',
maskfill: 'rgba(255,255,255,0.1)',
series: {
color: '#7798bf',
linecolor: '#a6c7ed'
},
xaxis: {
gridlinecolor: '#505053'
}
},
scrollbar: {
barbackgroundcolor: '#808083',
barbordercolor: '#808083',
buttonarrowcolor: '#ccc',
buttonbackgroundcolor: '#606063',
buttonbordercolor: '#606063',
riflecolor: '#fff',
trackbackgroundcolor: '#404043',
trackbordercolor: '#404043'
},
// special colors for some of the
legendbackgroundcolor: 'rgba(0, 0, 0, 0.5)',
background2: '#505053',
datalabelscolor: '#b0b0b3',
textcolor: '#c0c0c0',
contrasttextcolor: '#f0f0f3',
maskcolor: 'rgba(255,255,255,0.3)'
};
// apply the theme
highcharts.setoptions(highcharts.theme);
score:7
simply add this line in your html after all highcharts include scripts
<script src="https://code.highcharts.com/themes/dark-unica.js"></script>
so it could look like this
<script src="https://code.highcharts.com/8.0.0/highcharts.js"></script>
<script src="https://code.highcharts.com/8.0.0/highcharts-more.js"></script>
<script src="https://code.highcharts.com/8.0.0/modules/solid-gauge.js"></script>
<script src="https://code.highcharts.com/8.0.0/modules/exporting.js"></script>
<script src="https://code.highcharts.com/8.0.0/modules/data.js"></script>
<script src="https://code.highcharts.com/8.0.0/modules/drilldown.js"></script>
<script src="https://code.highcharts.com/8.0.0/modules/heatmap.js"></script>
<script src="https://code.highcharts.com/8.0.0/modules/treemap.js"></script>
<script src="https://code.highcharts.com/8.0.0/modules/export-data.js"></script>
<script src="https://code.highcharts.com/8.0.0/modules/accessibility.js"></script>
<script src="https://code.highcharts.com/8.0.0/themes/dark-unica.js"></script>
credit: @fernanda ines duran (in the comments)
Source: stackoverflow.com
Related Query
- change theme of highscharts (highstock) chart
- how to dynamically change chart type in highstock stock chart?
- How to change the theme of a Highstock graph with a button?
- Strange character in the Highstock source code
- Change highstock chart zones on click yAxis
- Change HighStock chart label on changing rangeselector button
- Highcharts / highstock how to change title of chart in IE?
- Highstock change xAxis minRange after chart is loaded
- Change only "Input Date" text of HIghStock Chart without setExtrerems?
- Programmatically change a chart title in highcharts
- Highcharts : Change opacity of a column chart
- how can I move yAxis labels from Right of chart to left of chart in highstock
- Change Highcharts tooltip formatter from chart Object , after chart is rendered
- How to create a new Highstock chart with new Highchart and not jquery?
- Displaying multiple series in the navigator of an HighStock chart
- highcharts jquery dynamic change chart type column to bar
- HighCharts Dynamically Change Chart Type
- Change series data dynamically in react-highcharts without re-render of the chart
- Change color of area chart programmatically in highcharts
- how to change highstock date to persian date
- x-axis tickInterval not working correctly in highstock chart
- Which chart type should i choose to show change in values between 2 dates?
- Highcharts Donut Chart text in center change on hover
- How to change axis label size when exporting in Highcharts / Highstock
- Highcharts, Can you change the chart type for drilldowns?
- Highcharts, How can I change the datalable distance in a pie chart based on the value
- Show gridLines when the chart is empty(no series) in highstock
- How to extract the data from highstock chart
- highcharts: column chart color change based on value
- change navigator date format in highstock
More Query from same tag
- Highstock, border around yAxis or different background colors for each yAxis?
- Jquery: Dynamic binding events on a Highcharts object
- Highcharts bar chart json example?
- Show gridLines when the chart is empty(no series) in highstock
- Highcharts - Getting chart on click event
- How to force Highcharts to show last label on xAxis?
- Remove padding above bar columns
- Add 2 legends in one chart
- Highcharts: Access the Series or Axis context in Axis Formatter
- HighCharts Axis Formatting in Chrome
- highcharts add series from array
- jQuery UI Tabs and Highcharts display/rendering issue
- Formating date from database for use in Highcharts
- HighCharts Hide Series Name from the Legend
- Using multiple Highcharts in a single page
- Highcharts categories from data array
- Highcharts: legend on bottom with custom marginBottom already
- Dynamically Adding A Chart into A Combo Highcharts?
- Highcharts plugin: show/hide tooltips on click
- How to hide single point bar in serie
- How to do In highchart tooltip display the first 100 characters and then say "See more .."?
- Highcharts 4.1.1 adding a severe drop shadow to data labels if you specify a font color
- Range selector in Highstock.js / Angular.js doesn't update chart when xAxis configuration field is present
- Highcharts plotlines above area using DOM
- Highcharts NG stockchart animation effect only on navigator Type: column
- Highcharts - Add Series Name As X-Axis Label
- Flot - images in axis labels?
- Get only visible x axis dates when zooming in highcharts
- Ignore tfoot table rows when creating Highcharts from HTML table
- How is the x-axis data determined in this chart