Comments (7)
I see the same - all charts are "line". Done some digging but can't work it out.
from angular2-seed-ng2-highcharts.
Use the 2013 version of the js lib (available thtugh Plnkr; if u don't find it i can send u next when i'm back from vacation).
Cioa
On 27/gen/2016, at 15:49, fergusg [email protected] wrote:
I see the same. Done some digging but can't work it out.
—
Reply to this email directly or view it on GitHub.
from angular2-seed-ng2-highcharts.
@Bigous would you take a look at this?
from angular2-seed-ng2-highcharts.
Hi people, I'll look at it tomorrow. Sorry about the delay.
from angular2-seed-ng2-highcharts.
Pull #4 solves this on the example repo, the bug was on ng2-highcharts - thanks for reporting it.
from angular2-seed-ng2-highcharts.
I have made a couple of changes to the code and it seems to work (i.e.
allow changing type of chart).
Similarly, I have created also a variation to allow use of Highstocks
charts.
Here is the code. I hope it can help.
Ciao
Enrico
ng2-highcharts.ts
///
declare var jQuery: any;
import {Directive, ElementRef, Input} from 'angular2/core';
@directive({
selector: '[ng2-highcharts]'
})
export class Ng2Highcharts {
hostElement: ElementRef;
chart: HighchartsChartObject;
constructor(ele: ElementRef) {
this.hostElement = ele;
}
@input('ng2-highcharts') set options(opt:HighchartsOptions) {
if(!opt) {
console.log('No valid options...');
console.log(opt);
return;
}
if(opt.series || opt.data) {
let nativeEl = this.hostElement.nativeElement;
let jQ = jQuery(nativeEl);
this.chart = jQ.highcharts(opt);
} else {
console.log('No valid options...');
console.dir(opt);
}
}
}
ng2-highstocks.ts
///
declare var jQuery: any;
import {Directive, ElementRef, Input} from 'angular2/core';
@directive({
selector: '[ng2-highstocks]'
})
export class Ng2Highstocks {
hostElement: ElementRef;
chart: any;
constructor(ele: ElementRef) {
this.hostElement = ele;
}
@Input('ng2-highstocks') set options(opt: any) {
if (!opt) {
console.log('No valid options 1 ...');
console.log(opt);
return;
}
if (opt.series) {
let nativeEl = this.hostElement.nativeElement;
let jQ = jQuery(nativeEl);
this.chart = jQ.highcharts('StockChart', opt);
} else {
console.log('No valid options...');
console.dir(opt);
}
}
}
On Sun, Jan 31, 2016 at 9:17 PM, Richard Natal [email protected]
wrote:
Hi people, I'll look at it tomorrow. Sorry about the delay.
—
Reply to this email directly or view it on GitHub
#3 (comment)
.
from angular2-seed-ng2-highcharts.
Hi @EnricoPicci, I'm moving your last comment to ng2-highcharts repo. Thanks.
from angular2-seed-ng2-highcharts.
Related Issues (12)
- how to get highchart js object ? HOT 1
- How to run in production server? HOT 1
- npm install error HOT 2
- Cannot find module error TS2307 HOT 1
- Info about feature
- Can't resolve module @angular/core/src/di/metadata from dist\tmp\app\index.ts
- Multiple charts on a page HOT 2
- Example error HOT 2
- Update the seed
- Questions: How to update bar series data in highcharts? HOT 2
- How to handle click events on pie/bar chart? HOT 4
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-seed-ng2-highcharts.