Highcharts 将主题还原为默认主题
在我应用了一些主题之后,如何将我的主题恢复到Highcharts中的默认主题 我试过了,但没用Highcharts 将主题还原为默认主题,highcharts,highstock,Highcharts,Highstock,在我应用了一些主题之后,如何将我的主题恢复到Highcharts中的默认主题 我试过了,但没用 Highcharts.theme = { }; var highchartsOptions = Highcharts.setOptions(Highcharts.theme); 我还尝试了描述的解决方案 从下面的代码中删除所有颜色选项并重新加载 Highcharts对象将使其默认为基本主题 …但它也不起作用 非常感谢不幸的是,您需要为第二张图表用默认值覆盖所有颜色/参数 您有将其还原为默认值的示
Highcharts.theme = {
};
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
我还尝试了描述的解决方案
从下面的代码中删除所有颜色选项并重新加载
Highcharts对象将使其默认为基本主题
…但它也不起作用
非常感谢不幸的是,您需要为第二张图表用默认值覆盖所有颜色/参数
您有将其还原为默认值的示例颜色吗?
var theme = {
colors: ['#2f7ed8', '#0d233a', '#8bbc21', '#910000', '#1aadce', '#492970',
'#f28f43', '#77a1e5', '#c42525', '#a6c96a'],
chart: {
backgroundColor: '#fff',
borderWidth: 0,
plotBackgroundColor: '#fff',
plotShadow: false,
plotBorderWidth: 0
},
title: {
style: {
color: '#274b6d',//#3E576F',
fontSize: '16px'
}
},
subtitle: {
style: {
color: '#4d759e'
}
},
xAxis: {
gridLineWidth: 0,
lineColor: '#C0D0E0',
tickColor: '#C0D0E0',
labels: {
style: {
color: '#666',
cursor: 'default',
fontSize: '11px',
lineHeight: '14px'
}
},
title: {
style: {
color: '#4d759e',
fontWeight: 'bold'
}
}
},
yAxis: {
minorTickInterval: null,
lineColor: '#C0D0E0',
lineWidth: 1,
tickWidth: 1,
tickColor: '#C0D0E0',
labels: {
style: {
color: '#666',
cursor: 'default',
fontSize: '11px',
lineHeight: '14px'
}
},
title: {
style: {
color: '#4d759e',
fontWeight: 'bold'
}
}
},
legend: {
itemStyle: {
color: '#274b6d',
fontSize: '12px'
},
itemHoverStyle: {
color: '#000'
},
itemHiddenStyle: {
color: '#CCC'
}
},
labels: {
style: {
color: '#3E576F'
}
},
navigation: {
buttonOptions: {
theme: {
stroke: '#CCCCCC'
}
}
}
};