
Security News
Research
Destructive npm Packages Disguised as Utilities Enable Remote System Wipe
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
云实验室项目孔板可视化组件
安装 heatmap-c 组件,npm i heatmap-c
该组件输入的数据格式
{
data: {
data: heatmapData,
config: {
commonConfig: {
size: [8, 12],
legend: {
show: true
},
selected: [true, true, true, false]
},
classConfig: [
{
data:[],
name:"",
scatter:{
formatter: '',
rich: {
rich:{},
emphasisRich:{}
},
itemStyle: {}
}
},
...
]
}
}
1.在项目的 main.ts 文件中引入组件
// 导入热力图组件
import HeatmapC from 'heatmap-c'
app.use(HeatmapC)
2.在页面中使用组件
<template>
<heatmap-c :datasource="data" />
</template>
<script setup>
// 【X轴,Y轴,状态对应的值(1是合格、2是不合格等)】
var heatmapData = [
[0, 0, 1, {id: 1}],
[0, 1, 1, {id: 2}],
[0, 2, 4, {id: 3}],
]
// 孔板中默认的孔位效果
let wmsRich = {
width: 18,
height: 18,
align: 'center',
verticalAlign: 'top',
borderColor: 'black',
opacity: 1,
lineHeight: 20,
backgroundColor: {
image: ''
}
}
// 孔板状态数组
let wmsLabelArray = ['DNA', '感受态', '引物', '大肠杆菌', '培养液', '引物-1']
// 孔板每个状态对应选中和默认的颜色
let wmsColor = [
{ selected: '#52C41A', default: '#95DE64' },
{ selected: '#FF9D00', default: '#FFC15E' },
{ selected: '#005AEA', default: '#5898FF' },
{ selected: '#E90909', default: '#FF4D4F' },
{ selected: '#680DB6', default: '#8E58DA' },
{ selected: '#005AEA', default: '#5898FF' }
]
// 孔板中每个状态对应的样式配置
let wmsClassConfigArray = []
wmsLabelArray.map((item, index) => {
let configItem = {
name: item, // 状态名称
data: heatmapData.filter(val => {
return val[2] === index + 1
}),
scatter: {
formatter: 'wms',
rich: {
rich: {
...wmsRich,
backgroundColor: {
image: dna_icon.image // 默认时的孔板图标
}
}
},
itemStyle: {
selected: wmsColor[index].selected,
default: wmsColor[index].default
}
}
}
wmsClassConfigArray.push(configItem)
})
let wmsConfig = {
commonConfig: {
size: [7, 12],
legend: {
disabled: true
}
},
classConfig: wmsClassConfigArray
}
let data = ref({
data: heatmapData,
config: wmsConfig
})
</script>
FAQs
> 云实验室项目孔板可视化组件
We found that heatmap-c 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.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.
Research
Security News
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.