antvis / antvis/F2

TextGuide和ScrollBar连用会出现视觉bug,未展示的值会在y轴旁出现

Open
#1,953 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

/** @jsx jsx */
import {
jsx,
Canvas,
Chart,
Line,
Point,
Axis,
Tooltip,
TextGuide,
ScrollBar,
} from "@antv/f2";

const data = [
{
date: "2024-04-10 12:00",
weight: 12,
},
{
date: "2024-04-10 13:00",
weight: 13,
},
{
date: "2024-04-10 14:00",
weight: 19,
},
{
date: "2024-04-10 15:00",
weight: 12,
},
{
date: "2024-04-10 16:00",
weight: 17,
},
{
date: "2024-04-10 17:00",
weight: 512,
},
{
date: "2024-04-10 18:00",
weight: 212,
},
{
date: "2024-04-10 19:00",
weight: 112,
},
{
date: "2024-04-10 20:00",
weight: 812,
},
{
date: "2024-04-10 21:00",
weight: 122,
},
{
date: "2024-04-10 22:00",
weight: 125,
},
{
date: "2024-04-10 23:00",
weight: 12,
},
{
date: "2024-04-11 00:00",
weight: 12,
},
{
date: "2024-04-11 01:00",
weight: 12,
},
{
date: "2024-04-11 02:00",
weight: 12,
},
{
date: "2024-04-11 03:00",
weight: 12,
},
{
date: "2024-04-11 04:00",
weight: 12,
},
{
date: "2024-04-11 05:00",
weight: 12,
},
{
date: "2024-04-11 06:00",
weight: 12,
},
{
date: "2024-04-11 07:00",
weight: 120,
},
{
date: "2024-04-11 08:00",
weight: 12,
},
{
date: "2024-04-11 09:00",
weight: 12,
},
{
date: "2024-04-11 10:00",
weight: 12,
},
{
date: "2024-04-11 11:00",
weight: 912,
},
{
date: "2024-04-11 12:00",
weight: 12,
},
];

const context = document.getElementById("container").getContext("2d");
const LineChart = (








{data.map((item) => {
const { weight } = item;
return (

);
})}


);

const chart = new Canvas(LineChart.props);
chart.render();
![image](https://github.com/antvis/F2/assets/21049559/69ea5f08-84d6-4543-8e07-03879b78f3c2)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the provided Canvas, Chart, TextGuide, and ScrollBar example, especially the x range [0.1, 0.6]. Start by tracing how TextGuide records are rendered together with ScrollBar filtering, then verify that values outside the visible range no longer appear beside the y-axis.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.