Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] crosshiar should follow tooltip #2666

Closed
xile611 opened this issue May 13, 2024 · 1 comment
Closed

[Feature] crosshiar should follow tooltip #2666

xile611 opened this issue May 13, 2024 · 1 comment
Assignees

Comments

@xile611
Copy link
Contributor

xile611 commented May 13, 2024

What problem does this feature solve?

const spec = {
  type: 'line',
  data: {
    values: [
      {
        time: '2:00',
        value: 38
      },
      {
        time: '4:00',
        value: 56
      },
     
      {
        time: '10:00',
        value: 36
      },
      {
        time: '14:00',
        value: 24
      },
      {
        time: '16:00',
        value: 44
      },
      {
        time: '22:00',
        value: 22
      }
    ]
  },
  xField: 'time',
  yField: 'value',
  line: {
    style: {
      curveType: 'monotone'
    }
  },
  axes: [{
    orient: 'bottom',
    type: 'band',
    domain: new Array(24).fill(0).map((entry, index) => {
      return `${index}:00`
    })
  }]
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;
image image
  1. tooltip现在只在有数据的点展示,但是crosshair 在没数据的点也会展示,希望crosshair 和tooltip同步

What does the proposed API look like?

{
  followTooltip: true
}
@xile611 xile611 self-assigned this May 14, 2024
@xile611
Copy link
Contributor Author

xile611 commented May 30, 2024

supported in 1.11.1

@xile611 xile611 closed this as completed May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant