Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Acharts is a javascript charts,using svg and vml,Using Raphael as a foundation.
<script src="http://g.tbcdn.cn/bui/acharts/1.0.15/acharts-min.js"></script>
var chart = new AChart({
//configs
});
// use acharts
id 图表渲染到的容器的id,必须
width 图表的宽度,如果设置forceFit :true,则自动计算宽度
height 图表的高度
data 图表的数据,如果此属性设置,series内部就不需要设置data
forceFit 图表宽度自适应,窗口发生改变时,图表宽度自适应
fitRatio 如果设置了forceFit 那么宽高的比例由此属性决定,默认0,不按照比例设置高度
title 图表标题,设置null时不显示,是一个文本图形,配置信息参考:文本
subTitle 图表子标题,设置null时不显示,是一个文本图形,配置信息参考:文本
yAxis y轴坐标,配置信息类似于 xAxis,特别之处在于:
yTickCounts y轴坐标轴的坐标点的个数,决定显示的文本和栅格密度,这个值是一个数组类型,指定最小、最大个数,默认 : [3,5]
xTickCounts x轴坐标轴的坐标个数,也是有个数组 ,默认 [5,10]
colors 颜色列表,多个图表序列时,每个图表序列的颜色依次自动赋值
tooltip 提示信息,详细信息参考tooltip
legend 图例,详细信息参考图例
series 图表序列的配置信息,是一个数组,每个对象代表一个图表序列,详细信息参考图表序列,详细文档,更多图表序列
seriesOptions 图表序列统一的配置信息,多个同样的图表序列的配置信息可以一起配置
theme 图表的皮肤,详细信息参考图表皮肤
render() 渲染图表
on(eventName,fn) 绑定事件
off(eventName,fn) 解除事件绑定
get(name) 获取属性
set(name,value) 设置属性
getSeries() 返回所有的series
getSeriesByName(name) 获取指定名称的series
getXAxis(seriesName) 根据序列series的name返回对应的x坐标轴,如果不指定则取第一个序列的x坐标轴
getYAxis(seriesName) 根据序列series的name返回对应的y坐标轴,如果不指定则取第一个序列的y坐标轴
changeData(data) 更改数据,如果有多个序列则 data 是一个多维数组,data = [data1,data2...datan]
图表支持的事件类型:
绑定事件的代码
chart.on('plotclick',function(ev){
var shape = ev.shape;
if(shape){
//TO DO
}
});
1.0.34
FAQs
---
The npm package acharts receives a total of 0 weekly downloads. As such, acharts popularity was classified as not popular.
We found that acharts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.