-
Notifications
You must be signed in to change notification settings - Fork 48
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
Loading drilldown module #2
Comments
@realcheese thank you to open this issue, I have already add this feature to load modules. |
awesome! I will try it out and update how it goes. |
Using your demo files, drilldown function works for me. But for some reason, in my own project (Laravel 5.4), drilldown won't work for me. I'm suspecting something is going on with my app.js file created by Webpack. I compared my app.js file with your bundle.js and there are some major differences. Basic Highchart maps work fine in my project though. Do you have any idea what I might be doing wrong? |
can you show the code how do you import and load modules? |
Using your example, I had to make small changes or it would error when running
|
|
I've tried that, with either spelling, it compiles successfully. But still no luck |
sorry,I have no idea about what's wrong. It hard to find the problem. Maybe you can isolation the code about vue-highcharts from your project to test if it works fine. |
Do you mind looking at a gist, it contains my app.js file. I did a diff in my IDE and mine misses huge chunks that your bundle.js has. https://gist.github.com/realcheese/230efdb351a9ed311f79e54ccc2f2816 |
ok, can you put your webpack.config.js on gist? |
Ah, I think this is the reason why. I'm currently using the default webpack.config.js that comes out of the box for Laravel Mix. https://gist.github.com/realcheese/441b0fb6978e3b2ce23c5e46d3f2ff12 I'm looking at your project's webpack.config.js right now to see what I need to add to mine... |
I'm new to Webpack, so I'm definitely lost lol |
I'm not sure if I need to be customizing my webpack.mix.js file. If I need to, I can do so with the following function:
But looking at your webpack.config.js, I don't see anything extra that I need to do that Laravel Mix is already doing out of the box. |
So this is what worked for me:
Before, I was using the following line (basic maps worked but not drilldown)
I'm not sure why it behaves like this. Also, even with the revised import, I receive the following error:
I suspect relative error is caused by the new import line pointing directly to VueHighcharts.vue? My temporary solution has been to delete the .babelrc file from the node_modules/vue2-highcharts folder - this at least runs without error and drilldown finally works. I will update if I find the correct solution. |
I also found the same problem. |
@realcheese I have already fix the bug. You can update to use it . // import add-ons and pass in the Highcharts
import Drilldown from '../node_modules/highcharts/modules/Drilldown.js'
import Highcharts from 'highcharts'
Drilldown(Highcharts);
// pass Highcharts to the VueHicharts instance(if you needn't to use other feature modules, you don't have to pass it.)
<vue-highcharts :Highcharts="Highcharts" :options="drilldownOptions" ref="drilldownChart"></vue-highcharts> When you want to use other feature modules, you should pass |
thank you! I will try it out
Update: I haven't had a chance to try the update as I have it working in my current project. Next week I should be able to go back and try again.
…________________________________
From: Superman <notifications@github.com>
Sent: Tuesday, April 18, 2017 3:40:01 AM
To: superman66/vue-highcharts
Cc: Jason Pham; Mention
Subject: Re: [superman66/vue-highcharts] Loading drilldown module (#2)
@realcheese<https://github.com/realcheese> I have already fix the bug. You can update to use it .
npm install vue2-highcharts@1.03.
And there are some different when you use it.
// import add-ons and pass in the Highcharts
import Drilldown from '../node_modules/highcharts/modules/Drilldown.js'
import Highcharts from 'highcharts'
Drilldown(Highcharts);
// pass Highcharts to the VueHicharts instance(if you needn't to use other feature modules, you don't have to pass it.)
<vue-highcharts :Highcharts="Highcharts" :options="drilldownOptions" ref="drilldownChart"></vue-highcharts>
When you want to use other feature modules, you should pass Highcharts props to the Vue-Highcharts compoennt instance.
(sorry for my poor english)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/APG0z_ThYKN70N2psC6eTOnm8daSkU-Iks5rxJMBgaJpZM4M_SC8>.
|
I have no issues with installing and using it within my Laravel project. How do we load modules in though? I'm trying to get the drilldown module working with this but have had no luck.
The text was updated successfully, but these errors were encountered: