vue.jsvuejs2highchartsvue-portal

Displaying a vue component inside highcharts tooltip via vue-portal


I'm quite far on this but getting stuck here.

Here is my nearly complete example:

https://codesandbox.io/s/highcharts-vue-demo-forked-5pgv2h?file=/src/components/Chart.vue

What I'm doing

My Problem

Note

This is related to this issue https://github.com/highcharts/highcharts-vue/issues/136

But I struggle with composition-API and I could not make his example work when translating it to options-API. You may recognise that my codesandbox-example is a fork of his.


Solution

  • I got it. I worked my up on @Denyllon (see Github-Link) solution.

    Here with JSX in the render() function

    https://codesandbox.io/s/highcharts-vue-demo-forked-zv4czp?file=/src/components/Chart.vue

    Then I took out JSX, still using render()

    https://codesandbox.io/s/vue-tooltip-working-native-render-gg6pf5

    Last but not least I took out JSX at all, just using

    https://codesandbox.io/s/vue-tooltip-working-template-qz7wvw?file=/src/components/Chart.vue