Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
koishi-plugin-echarts
Advanced tools
为 Koishi 提供 Echart,
学习 Options | Echarts 官网实例 | 主题相关
package.json
....
"peerDependencies": {
"koishi": "^4.14.0",
"koishi-plugin-echarts": "^最新版"
}
....
// 务必 import,所有服务都要这样
import {} from "koishi-plugin-echarts"
...
// 具体代码实例,仅供参考
const option = {
legend: {},
tooltip: {},
dataset: {
// 提供一份数据。
source: [
['product', '2015', '2016', '2017'],
['Matcha Latte', 43.3, 85.8, 93.7],
['Milk Tea', 83.1, 73.4, 55.1],
['Cheese Cocoa', 86.4, 65.2, 82.5],
['Walnut Brownie', 72.4, 53.9, 39.1]
]
},
// 声明一个 X 轴,类目轴(category)。默认情况下,类目轴对应到 dataset 第一列。
xAxis: { type: 'category' },
// 声明一个 Y 轴,数值轴。
yAxis: {},
// 声明多个 bar 系列,默认情况下,每个系列会自动对应到 dataset 的每一列。
series: [{ type: 'bar' }, { type: 'bar' }, { type: 'bar' }]
};
const chart = ctx.echarts.createChart(1000, 700, option)
const buffer = chart.canvas.toBuffer("image/png")
chart.dispose() // 除非你还想用否则务必销毁实例
return h.image(buffer, "image/png");
FAQs
Provide echarts with Canvas in Koishi
The npm package koishi-plugin-echarts receives a total of 39 weekly downloads. As such, koishi-plugin-echarts popularity was classified as not popular.
We found that koishi-plugin-echarts demonstrated a healthy version release cadence and project activity because the last version was released less than 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.