SpoonX / aurelia-charts

Graphs plugin for aurelia. Supports all libraries.
MIT License
12 stars 5 forks source link

Can't Properly Configure #23

Closed NickSchweitzer closed 3 years ago

NickSchweitzer commented 7 years ago

I'm using the SPA Templates for ASP.NET Core as the base of an application https://github.com/aspnet/JavaScriptServices

I created a base application and have been making additions to it. I installed Aurelia-charts according to the directions for Webpack in the instructions, but am confused by the following line: "And add aurelia-charts in the coreBundles.aurelia section of your webpack.config.js"

There is no coreBundles.aurelia section in my webpack.config file (attached with a .txt extension) and I can't seem to find documentation on where it should go, or what the properties are. Can you clarify that?

When I add the .plugin calls described to the configure function, it basically breaks my app from loading. If I comment out plotly and charts, it still breaks. The only one that seems to work without stopping the app from loading is c3. .plugin('aurelia-charts-plotly') .plugin('aurelia-charts-c3') .plugin('aurelia-charts', charts => { charts.configure({ defaults: { / the default library type / library: 'C3', / the default chart type / type: 'line',

                /* what library to use for the chart type */
                libraries: {
                    bar: 'c3',
                    geo: 'datamaps'
                }
            }
        })
    });

webpack.config.js.txt

NickSchweitzer commented 7 years ago

After some further tweaking (adding some missing dependencies), I'm still running into the same issues, but have some further questions. In the Output window as I run the app, I get the following:

Microsoft.AspNetCore.NodeServices:Error: Unable to resolve component/dimensions-picker.html Microsoft.AspNetCore.NodeServices:Error: Unable to resolve aurelia-charts/component/chart-picker. Microsoft.AspNetCore.NodeServices:Error: Unable to resolve aurelia-charts/component/dimensions-picker

Where can I add those dependencies so they get picked up? That might resolve my issue

RWOverdijk commented 7 years ago

@bas080 could you help this guy out? :)

NickSchweitzer commented 7 years ago

Haven't heard anything - I've dropped this plugin in favor of aurelia-chart which I was able to get to work based on their instructions.

RWOverdijk commented 7 years ago

@NickSchweitzer 👍 keeping this open though

JonSomNor commented 7 years ago

Could someone please provide an answer to Nicks question?? I'm probably not the only one looking for the coreBundles.aurelia section of webpack.config.js...

bas080 commented 7 years ago

I have not used webpack together with this plugin. I'm unlikely able to help you anytime soon @NickSchweitzer and @JonSomNor.

JonSomNor commented 7 years ago

Ok, thanx for responding anyway bas080!

robscottnh commented 6 years ago

I'm having the same issue. There is no coreBundles.aurelia seciton of webpack.config.js when using the asp.net core templates. What should it look like and where should it go?

ehudkaldor commented 6 years ago

same here. no coreBundles

robscottnh commented 6 years ago

I've figured out a little bit of the issue, I'm not exactly sure how to overcome it (WebPack newb), but I've outlined what I think is going on here:

https://github.com/aspnet/JavaScriptServices/issues/1406

TLDR: coreBundles is the name of string that is used in one version of webpack.config.js (that is used by the developers of many of these plug-ins), while the webpack.config.js generated by the ASP.NET Core skeletons doesn't use that string, but seems to be using another method to gather the dependencies.

Being a newb to webpack, I'm not sure how to resolve the two methods of describing the dependencies.

Regards, Rob

RWOverdijk commented 6 years ago

PRs are welcome. Anyone willing to step forward to help maintain this lib can contact me, too.