Skip to content

Commit ce6a35f

Browse files
committed
feat: frequency del group
1 parent 90accd6 commit ce6a35f

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

src/pages/Feature/D3/Frequency.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -560,11 +560,13 @@ 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) {
568+
console.log('targetFrequencyRange', targetFrequencyRange);
569+
568570
const startX = getXPosition(targetFrequencyRange[0]);
569571
const endX = getXPosition(targetFrequencyRange[1]);
570572

@@ -581,17 +583,17 @@ const Frequency = () => {
581583
.style('pointer-events', 'none');
582584

583585
// 添加标记线
584-
[startX, endX].forEach((x) => {
585-
frequencyMarkerGroup
586-
.append('line')
587-
.attr('x1', x) // 从顶部开始
588-
.attr('y1', 0) // 从顶部开始
589-
.attr('x2', x) // 到底部结束
590-
.attr('y2', totalHeight - margin.bottom) // 到底部结束
591-
.attr('stroke', 'green')
592-
.attr('stroke-width', 1)
593-
.style('pointer-events', 'none');
594-
});
586+
// [startX, endX].forEach((x) => {
587+
// frequencyMarkerGroup
588+
// .append('line')
589+
// .attr('x1', x) // 从顶部开始
590+
// .attr('y1', 0) // 从顶部开始
591+
// .attr('x2', x) // 到底部结束
592+
// .attr('y2', totalHeight - margin.bottom) // 到底部结束
593+
// .attr('stroke', 'green')
594+
// .attr('stroke-width', 1)
595+
// .style('pointer-events', 'none');
596+
// });
595597

596598
// 添加频率标签
597599
// [

0 commit comments

Comments
 (0)