HighCharts设置图表背景透明
其实就一句话:
backgroundColor: 'rgba(0,0,0,0)'
完整示例:
$(function () {
$('#container').highcharts({
chart: {
type: 'column',
backgroundColor: 'rgba(0,0,0,0)'
},
title: {
text: 'Stacked column chart'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
min: 0,
title: {
text: 'Total fruit consumption'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
legend: {
align: 'right',
x: -70,
verticalAlign: 'top',
y: 20,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
borderColor: '#CCC',
borderWidth: 1,
shadow: false
},
tooltip: {
formatter: function() {
return '<b>'+ this.x +'</b><br/>'+
this.series.name +': '+ this.y +'<br/>'+
'Total: '+ this.point.stackTotal;
}
},
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
}
}
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2]
}, {
name: 'Jane',
data: [2, 2, 3, 2, 1]
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5]
}]
});
});
还有另外一个属性,plotBackgroundColor: null
这个属性的意思是指图表部分,不含标题、说明信息,x轴y轴上的提示信息等部分的背景色,例如:
HighCharts设置图表背景透明的更多相关文章
- 设置UITableView背景透明/监听cell左边的删除按钮的点击事件
_tableView = [[UITableView alloc] init]; _tableView.delegate = self; _tableView.dataSource = self; _ ...
- 设置div背景透明的两种方法
实现div背景透明的两种方法 1.使用opacity属性 background-color:#000; opacity: 0.5; 这样做可以设置div内部所以区域的透明度,但是也会影响里面的文字,效 ...
- 设置div背景透明的CSS样式
div背景透明样式: 样式代码: .alert{filter:alpha(opacity=100); /* IE */ -moz-opacity:1.0; /* Moz + FF */ opacity ...
- Android 设置按钮背景透明与半透明_图片背景透明
Button或者ImageButton的背景设为透明或者半透明 半透明<Button android:background="#e0000000" ... /> 透明 ...
- 使用rgba设置输入框背景透明
项目中遇到要求输入框的背景设置透明度,但文字不受影响,如下图 输入框使用input标签 <input ref="searchText" type="search&q ...
- Duilib + wke 设置wke背景透明
WkeWebKit.cpp 新增 wkeSetTransparent(m_pWebView, true); void CWkeWebkitUI::DoInit() { CControlUI::DoIn ...
- Android 代码设置Activity 背景透明
当指定Activity 样式 Them.Dialog 时候 又不同意用XML 设置 Activity 的背景颜色的时候 用代码 this.getWindow().getDecorView().setB ...
- 设置groupBox背景透明
步骤:属性-BackColor-WEB面板-Transparent
- 设置iframe背景透明
<iframe allowtransparency="true" src="page.htm" frameborder="0" > ...
随机推荐
- Booting LPC-Link2, Updating LPCXpresso firmware
Booting LPC-Link2 The recommended way to use LPC-Link2 with the LPCXpresso IDE is to boot and soft l ...
- tomcat点击startup.bat一闪而退的方法
摘要 在摸索tomcat的配置的时候,发现在启动tomcat服务器的时候,点击startup一闪而退. 解决办法 分析闪退原因,简单做法,右键编辑startup.bat文件,在最后一行添加“pause ...
- jeffy-vim-v3.2
jeffy-vim-v3.2 增加了vim-gutentags 插件,支持tags自动生成.
- log4j直接输出日志到flume
log4j.properties配置: log4j.rootLogger=INFOlog4j.category.com.besttone=INFO,flumelog4j.appender.flume ...
- Download Hacking Team Database from torrent using magnet link
20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送) 国内私募机构九鼎控股打造,九鼎投资是在全国股 ...
- 【Devops】【docker】【CI/CD】jenkins源码管理,添加SSH地址后报错+Jenkins构建报错:Please make sure you have the correct access rights and the repository exists.
jenkins源码管理,添加SSH地址后报错: Could not read from remote repository. Please make sure you have the correct ...
- Java从网络批量读取图片并保存至本网站服务器后再插入文章中
先来看效果: 查看一下系统操作日志 删除
- 用SAX和PULL进行XML文件的解析与生成
XML解析有传统的dom方法还有Jsoup,SAX,PULL等,这里讲的是比较省内存的SAX和PULL方法.Android中极力推荐用PULL的方式来解析,我个人觉得pull确实比较简单,但其内部的逻 ...
- Eclipse给安卓应用签名
- yolo源码解析(一)
原文:https://www.cnblogs.com/zyly/p/9534063.html yolo源码来源于网址:https://github.com/hizhangp/yolo_tensorfl ...