VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] press event not working

Open purpose233 opened this issue 4 months ago • 0 comments

Version

2.0.0

Link to Minimal Reproduction

null

Steps to Reproduce

const spec = {
  type: 'line',
  data: {
    values: [
      {
        time: '2:00',
        value: 8
      },
      {
        time: '4:00',
        value: 9
      },
      {
        time: '6:00',
        value: 11
      },
      {
        time: '8:00',
        value: 14
      },
      {
        time: '10:00',
        value: 16
      },
      {
        time: '12:00',
        value: 17
      },
      {
        time: '14:00',
        value: 17
      },
      {
        time: '16:00',
        value: 16
      },
      {
        time: '18:00',
        value: 15
      }
    ]
  },
  xField: 'time',
  yField: 'value'
};

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

VCHART_MODULE.registerGesturePlugin()

vchart.on('press', () => {
  confirm('press')
})
// vchart.on('click', () => {
//   confirm('click')
// })


// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;

Current Behavior

Press event will not be triggered.

Expected Behavior

Trigger press event after interaction.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

purpose233 avatar Aug 27 '25 10:08 purpose233