Comments (5)
Just tried to run [email protected]
with angular2-webpack-starter
and this works fine.
here is my how i changed the about.component.ts
component
import {Component} from 'angular2/core';
import { CHART_DIRECTIVES } from 'angular2-highcharts';
/*
* We're loading this component asynchronously
* We are using some magic with es6-promise-loader that will wrap the module with a Promise
* see https://github.com/gdi2290/es6-promise-loader for more info
*/
console.log('`About` component loaded asynchronously');
@Component({
selector: 'about',
directives: [CHART_DIRECTIVES],
styles: [`
h1 {
font-family: Arial, Helvetica, sans-serif
}
`],
template: `
<chart [options]="options"></chart>
<md-card>
<h1>
[email protected]
</h1>
</md-card>
`
})
export class About {
options: Object;
constructor() {
this.options = {
title : { text : 'simple chart' },
series: [{
data: [29.9, 71.5, 106.4, 129.2],
}]
};
}
ngOnInit() {
console.log('hello `About` component');
// static data that is bundled
// var mockData = require('assets/mock-data/mock-data.json');
// console.log('mockData', mockData);
// if you're working with mock data you can also use http.get('assets/mock-data/mock-data.json')
// this.asyncDataWithWebpack();
}
asyncDataWithWebpack() {
// you can also async load mock data with 'es6-promise-loader'
// you would do this if you don't want the mock-data bundled
// remember that 'es6-promise-loader' is a promise
// var asyncMockDataPromiseFactory = require('es6-promise!assets/mock-data/mock-data.json');
// setTimeout(() => {
//
// let asyncDataPromise = asyncMockDataPromiseFactory();
// asyncDataPromise.then(json => {
// console.log('async mockData', json);
// });
//
// });
}
}
from angular2-highcharts.
Despite i had a lot of Cannot find name 'foo'.
errors during bundling.
from angular2-highcharts.
@CristyTarantino Could you provide more details ?
from angular2-highcharts.
Hi,
Just wondering if someone has found a way to configure webpack to get rid of all the cannot find source file ... . The chart is showing but lots of warnings!
Thanks
from angular2-highcharts.
I just started to learn Angular and not an expert yet, but as I understand the problem is that when the plugin is installed via npm install angular2-highcharts --save or using package.json dependencies in the project, the src folder is missing. But there are some links to src folder in *.map files which cause warnings.
To solve the problem:
- I have created the node_modules\angular2-highcharts\src folder
- copied all *.ts files from node_modules\angular2-highcharts\dist folder
- renamed all of them inside just created src folders in order to remove all ".d" at the end.
I understand that this is temporary solution and there should be some more officiant way to do it.
from angular2-highcharts.
Related Issues (20)
- How to draw a candlestick chart? HOT 2
- How to show multiple chart in same graph? do you have any example?
- ERROR in Error during template compile of 'AppModule' Function calls are not supported in decorators but 'ChartModule' was called. HOT 5
- ar
- How to import "indicators" inside AppModule
- multi language support HOT 1
- use gauge chart in pure typeScript projects HOT 3
- Support for bullet type chart missing HOT 5
- Chart not responsive - width stuck at 600px no matter what I do HOT 7
- sunburst module missing ? HOT 2
- How to make Gauge chart dynamic as speedometer in angular 4 HOT 1
- Can't use responsive attribute in options
- The live demos do not work
- type=line did not show data in graph
- Use classic mode instead of Styled mode
- serie type of columnrange HOT 2
- Event properties target.category and clickevent.point are not available in angular 6 typescript
- How to use this plugin for commerical use HOT 1
- Angular 8 support?
- How to implement Gantt in angular2-highcharts? is it supported or not?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular2-highcharts.