Coder Social home page Coder Social logo

Comments (7)

fergusg avatar fergusg commented on July 29, 2024

I see the same - all charts are "line". Done some digging but can't work it out.

from angular2-seed-ng2-highcharts.

EnricoPicci avatar EnricoPicci commented on July 29, 2024

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.

mgechev avatar mgechev commented on July 29, 2024

@Bigous would you take a look at this?

from angular2-seed-ng2-highcharts.

Bigous avatar Bigous commented on July 29, 2024

Hi people, I'll look at it tomorrow. Sorry about the delay.

from angular2-seed-ng2-highcharts.

Bigous avatar Bigous commented on July 29, 2024

Pull #4 solves this on the example repo, the bug was on ng2-highcharts - thanks for reporting it.

from angular2-seed-ng2-highcharts.

EnricoPicci avatar EnricoPicci commented on July 29, 2024

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.

Bigous avatar Bigous commented on July 29, 2024

Hi @EnricoPicci, I'm moving your last comment to ng2-highcharts repo. Thanks.

from angular2-seed-ng2-highcharts.

Related Issues (12)

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.