refactor(temperatureSheet): 更新符号绘制函数以使用d3.symbol
- 移除未使用的d3-shape导入 - 将symbol()调用更改为d3.symbol()以保持一致性 - 优化数据处理模块的导入结构
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
// 数据处理
|
// 数据处理
|
||||||
import * as d3 from 'd3';
|
import * as d3 from 'd3';
|
||||||
import {symbol} from 'd3-shape';
|
|
||||||
import {
|
import {
|
||||||
degreesOnline,
|
degreesOnline,
|
||||||
disconnectEvents,
|
disconnectEvents,
|
||||||
@@ -142,7 +141,7 @@ export const iconDrawObj = {
|
|||||||
})
|
})
|
||||||
.append('path')
|
.append('path')
|
||||||
.call((path) => {
|
.call((path) => {
|
||||||
const symbolThree = symbol();
|
const symbolThree = d3.symbol();
|
||||||
const symbolIndex = 5;
|
const symbolIndex = 5;
|
||||||
symbolThree.type(d3.symbols[symbolIndex]);
|
symbolThree.type(d3.symbols[symbolIndex]);
|
||||||
path.attr('d', symbolThree.size(riangle)).attr('fill', fill).attr('stroke', stroke);
|
path.attr('d', symbolThree.size(riangle)).attr('fill', fill).attr('stroke', stroke);
|
||||||
|
|||||||
Reference in New Issue
Block a user