|
@@ -548,14 +548,15 @@ export default {
|
|
const isPublish = this.$route.path==='/pptpublish'||this.$route.path==='/pptenpublish'
|
|
const isPublish = this.$route.path==='/pptpublish'||this.$route.path==='/pptenpublish'
|
|
if(isShowTitle){
|
|
if(isShowTitle){
|
|
titleHTML = `<div style="
|
|
titleHTML = `<div style="
|
|
- textAlign:${chartTheme&&chartTheme.titleOptions.align};
|
|
|
|
- fontSize:${chartTheme&&chartTheme.titleOptions.style.fontSize}px;
|
|
|
|
- color:${chartTheme&&chartTheme.titleOptions.style.color}
|
|
|
|
|
|
+ text-align:${chartTheme&&chartTheme.titleOptions.align};
|
|
|
|
+ font-size:${chartTheme&&chartTheme.titleOptions.style.fontSize}px;
|
|
|
|
+ color:${chartTheme&&chartTheme.titleOptions.style.color};
|
|
|
|
+ height:18px;
|
|
">
|
|
">
|
|
${options.MyChartTitle}
|
|
${options.MyChartTitle}
|
|
</div>`
|
|
</div>`
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ const titleOption = isPublish&&isShowTitle?{marginTop:25}:{}
|
|
let SpecialOption = {
|
|
let SpecialOption = {
|
|
chart: {
|
|
chart: {
|
|
...defaultOpts.chart,
|
|
...defaultOpts.chart,
|
|
@@ -564,7 +565,8 @@ export default {
|
|
animation: false,
|
|
animation: false,
|
|
backgroundColor: "rgba(0,0,0,0)",
|
|
backgroundColor: "rgba(0,0,0,0)",
|
|
renderTo:$(`#${refName}`)[0],
|
|
renderTo:$(`#${refName}`)[0],
|
|
- ...options.chart||{}
|
|
|
|
|
|
+ ...options.chart||{},
|
|
|
|
+ ...titleOption
|
|
},
|
|
},
|
|
legend: {
|
|
legend: {
|
|
...defaultOpts.legend,
|
|
...defaultOpts.legend,
|
|
@@ -575,13 +577,14 @@ export default {
|
|
text: isShowTitle?newStr:null,
|
|
text: isShowTitle?newStr:null,
|
|
margin:0,
|
|
margin:0,
|
|
useHTML:false,
|
|
useHTML:false,
|
|
|
|
+ floating:true,
|
|
style:{...chartTheme&&chartTheme.titleOptions.style},
|
|
style:{...chartTheme&&chartTheme.titleOptions.style},
|
|
align: (chartTheme&&chartTheme.titleOptions.align) || (total>count?'left':'center'),
|
|
align: (chartTheme&&chartTheme.titleOptions.align) || (total>count?'left':'center'),
|
|
}:{
|
|
}:{
|
|
text: titleHTML,
|
|
text: titleHTML,
|
|
useHTML:true,
|
|
useHTML:true,
|
|
margin:0,
|
|
margin:0,
|
|
- style:{left:0}
|
|
|
|
|
|
+ style:{textAlign:chartTheme&&chartTheme.titleOptions.align,left:0,width:'100%'}
|
|
},
|
|
},
|
|
plotOptions: {
|
|
plotOptions: {
|
|
...defaultOpts.plotOptions,
|
|
...defaultOpts.plotOptions,
|