Skip to content

Commit 90accd6

Browse files
committed
feat: append add rect on line
1 parent 5309d0d commit 90accd6

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/pages/Feature/D3/Frequency.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,8 @@ const Frequency = () => {
560560
return leftPos + (rightPos - leftPos) * progress;
561561
};
562562

563-
// const targetFrequencyRange = [1000000, 140000000];
564-
const targetFrequencyRange: any = [];
563+
const targetFrequencyRange = [1000000, 140000000];
564+
// const targetFrequencyRange: any = [];
565565

566566
// 如果是第一个类型组,添加频率标记
567567
if (targetFrequencyRange.length > 0) {
@@ -577,7 +577,7 @@ const Frequency = () => {
577577
.attr('width', endX - startX) // 到底部结束
578578
.attr('height', totalHeight - margin.bottom) // 到底部结束
579579
.attr('fill', 'green')
580-
.attr('opacity', 0.1)
580+
.attr('opacity', 0.1) // 透明度
581581
.style('pointer-events', 'none');
582582

583583
// 添加标记线
@@ -589,11 +589,11 @@ const Frequency = () => {
589589
.attr('x2', x) // 到底部结束
590590
.attr('y2', totalHeight - margin.bottom) // 到底部结束
591591
.attr('stroke', 'green')
592-
.attr('stroke-width', 2)
592+
.attr('stroke-width', 1)
593593
.style('pointer-events', 'none');
594594
});
595595

596-
// // 添加频率标签
596+
// 添加频率标签
597597
// [
598598
// { x: startX, freq: targetFrequencyRange[0], align: 'start' },
599599
// { x: endX, freq: targetFrequencyRange[1], align: 'end' }

src/pages/Feature/D3/components/DataUnit.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ export const data: any = [
3535
status: '正常',
3636
},
3737
},
38-
// {
39-
// frequencyName: '设备A',
40-
// range: [35000, 140000000], // 35kHz-140MHz
41-
// color: '#4299e1',
42-
// slashStyle: { forward: true, backward: false },
43-
// customInfo: {
44-
// description: '测试设备',
45-
// power: '10W',
46-
// status: '正常',
47-
// },
48-
// },
38+
{
39+
frequencyName: '设备A',
40+
range: [35000, 140000000], // 35kHz-140MHz todo 无法渲染
41+
color: '#4299e1',
42+
slashStyle: { forward: true, backward: false },
43+
customInfo: {
44+
description: '测试设备',
45+
power: '10W',
46+
status: '正常',
47+
},
48+
},
4949
{
5050
frequencyName: '设备B',
5151
range: [90000000, 140000000], // 90MHz-140MHz

0 commit comments

Comments
 (0)