fix: 默认隐藏Z轴和温度
This commit is contained in:
parent
4587c29ec5
commit
e6c72e57e3
@ -158,12 +158,9 @@
|
|||||||
<option value="50">50</option>
|
<option value="50">50</option>
|
||||||
<option value="100">100</option>
|
<option value="100">100</option>
|
||||||
<option value="200">200</option>
|
<option value="200">200</option>
|
||||||
<option value="500" selected>500</option>
|
<option value="500">500</option>
|
||||||
<option value="1000">1000</option>
|
<option value="1000">1000</option>
|
||||||
<option value="2000">2000</option>
|
<option value="all" selected>全部</option>
|
||||||
<option value="5000">5000</option>
|
|
||||||
<option value="50000">50000</option>
|
|
||||||
<option value="all">全部</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -641,12 +638,16 @@
|
|||||||
dataTypes.forEach((type, typeIndex) => {
|
dataTypes.forEach((type, typeIndex) => {
|
||||||
const colorIndex = (sensorIndex * dataTypes.length + typeIndex) % colors.length;
|
const colorIndex = (sensorIndex * dataTypes.length + typeIndex) % colors.length;
|
||||||
|
|
||||||
|
// 默认隐藏Z轴和温度数据
|
||||||
|
const isHidden = type.key === 'z' || type.key === 'temperature';
|
||||||
|
|
||||||
datasets.push({
|
datasets.push({
|
||||||
label: `探头${sensorID} - ${type.label}`,
|
label: `探头${sensorID} - ${type.label}`,
|
||||||
data: sensorData.map(item => item[type.key]),
|
data: sensorData.map(item => item[type.key]),
|
||||||
fill: false,
|
fill: false,
|
||||||
borderColor: colors[colorIndex],
|
borderColor: colors[colorIndex],
|
||||||
tension: 0.1
|
tension: 0.1,
|
||||||
|
hidden: isHidden
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user