Git Product home page Git Product logo

Comments (5)

weizhenye avatar weizhenye commented on May 23, 2024 5

try this:

import Vue from 'vue'
import VueHighcharts from 'vue-highcharts'
import Highcharts from 'highcharts'
import loadDrillDown from 'highcharts/modules/drilldown'
loadDrillDown(Highcharts)
Vue.use(VueHighcharts, { Highcharts })

from vue-highcharts.

weizhenye avatar weizhenye commented on May 23, 2024 1

@km4
For those files are not modules, for example in antarctica data file, Highcharts.maps["custom/antarctica"] = {/* data */}, you will not get a value by import it.

Following codes might work:

import Vue from 'vue';
import VueHighcharts from 'vue-highcharts';
import Highcharts from 'highcharts/highstock';
import loadMap from 'highcharts/modules/map';

loadMap(Highcharts);

// import this file directly after loadMap()
import './custom/antarctica.js';

Vue.use(VueHighcharts, { Highcharts });

Or you can edit ./custom/antarctica.js to make it be a module.

from vue-highcharts.

km4 avatar km4 commented on May 23, 2024

Still dont working with my project,

If I use normal <script src="https://code.highcharts.com/modules/drilldown.js"></script> in template and set timeout it working correct
example:
index.html > <script src="https://code.highcharts.com/modules/drilldown.js"></script>
index.js >

setTimeout(()=>{
 new Vue({
  el: '#id',
  render: h => h(App),
  store: store,
});
}, 1500)

working fine.

How I can use this, the same example on highcharts demo

import Vue from 'vue'
import VueHighcharts from 'vue-highcharts'
import Highcharts from 'highcharts'
import loadDrillDown from 'highcharts/modules/drilldown'
loadDrillDown(Highcharts)
Vue.use(VueHighcharts, { Highcharts })

Dont work, the same with maps. I load map

<highmaps :options="options"></highmaps>
import Vue from 'vue';
import VueHighcharts from 'vue-highcharts';
import Highcharts from 'highcharts/highstock';
import loadMap from 'highcharts/modules/map';

loadMap(Highcharts);

Vue.use(VueHighcharts, { Highcharts });

and my $vm.Highcharts.maps is empty

from vue-highcharts.

weizhenye avatar weizhenye commented on May 23, 2024

@km4 It should works, see https://codesandbox.io/s/kxvqxzymm3

from vue-highcharts.

km4 avatar km4 commented on May 23, 2024

@weizhenye yes drill works fine.
Whats about map ? Why this loadMap don't work ?

Now I download map from https://code.highcharts.com/mapdata/.
Import in vue like import map from 'custom-world.js'; and add on series [{mapData: customWorld, }]

from vue-highcharts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.