🤔 [QUESTION] 区间条形图配置了slider缩略轴,移动缩略轴是根据y轴来显示隐藏的,不是根据x轴配置的时间去显示的,是缩略轴不支持区间条形图吗
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 591
- PR merge metrics
- No merged PRs in 30d
Description
以下是我的代码配置:
const data =[
{
id: 1,
timeRange: ['2023-03-01', '2023-03-22'],
name: '一期基础',
},
{
id: 2,
timeRange: ['2023-03-23', '2023-05-11'],
name: '1#',
},
{
id: 3,
timeRange: ['2023-04-12', '2023-05-31'],
name: '2#',
},
{
id: 4,
timeRange: ['2023-05-02', '2023-06-20'],
name: '3#',
},
{
id: 5,
timeRange: ['2023-05-22', '2023-07-10'],
name: '4#',
},
{
id: 6,
timeRange: ['2023-06-11', '2023-07-30'],
name: '5#',
},
{
id: 7,
timeRange: ['2023-07-01', '2023-08-19'],
name: '6#',
},
{
id: 8,
timeRange: ['2023-07-21', '2023-09-08'],
name: '7#',
},
{
id: 9,
timeRange: ['2023-08-10', '2023-09-28'],
name: '8#',
},
{
id: 10,
timeRange: ['2023-08-30', '2023-10-18'],
name: '9#',
},
{
id: 11,
timeRange: ['2023-09-19', '2023-11-07'],
name: '10#',
},
{
id: 13,
timeRange: ['2023-11-08', '2023-12-17'],
name: '配套区域1',
},
{
id: 14,
timeRange: ['2023-11-08', '2023-12-17'],
name: '配套区域2',
},
{
id: 15,
timeRange: ['2023-12-18', '2024-01-06'],
name: '绿化区',
},
]
let element = document.getElementById('container')
if (!element) return
const barPlot = new Bar(element, {
data,
xField: 'timeRange', // Time interval range
yField: 'name', // Classification
isRange: true,
xAxis: {
type: 'time',
min: '2023-03-01',
max: '2024-01-06',
// tickCount: 5, // Customize the number of ticks on the x-axis
tickMethod: 'time',
label: {
style: {
fill: '#666666', // X轴标签字体颜色
},
},
},
yAxis: {
label: {
style: {
fill: '#666666', // Y轴标签字体颜色
},
},
line: {
style: {
stroke: '#DDDDDD', // Y轴轴线颜色
},
},
},
tickLine: {
style: {
stroke: '#e5e5e5', // Y轴刻度线颜色
},
},
slider: {
start: 0,
end: 1,
onChange: (range) => {
console.log(range)
},
},
color: '#045DFF',
})
barPlot.render()
烦请哪位大佬伴我看看
Contributor guide
Research direction
Start by reproducing the reported behavior with the Bar configuration in the issue, focusing on the isRange interval bars, time-based xAxis, categorical yAxis, and slider. Trace how slider changes are applied and determine whether the slider is intended to control the time axis; done means the behavior is clarified or corrected and verified with a regression case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100