小编al3*_*350的帖子

单击highchart系列时调用角度分量方法

我使用angular2-highcharts,我想在本地函数中调用组件方法,但我不知道它是如何可能的.

你可以帮帮我吗 ?一个吸引人的例子:http://plnkr.co/edit/gOLGytp9PZXiXvv2wv1t?p = preview

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { NgModule, Component }    from '@angular/core';
import { BrowserModule }          from '@angular/platform-browser';
import { ChartModule }            from 'angular2-highcharts';

@Component({
    selector: 'my-app',
    styles: [`
      chart {
        display: block;
      }
    `],
    template: `<chart [options]="options"></chart>`
})
class AppComponent {
    constructor() {
        this.options = {
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false,
                type: 'pie'
            },
            title : { text : 'simple chart' },
            plotOptions: {
                series: {
                    turboThreshold:3000,
                    cursor: …
Run Code Online (Sandbox Code Playgroud)

highcharts angular2-highcharts angular

5
推荐指数
2
解决办法
2997
查看次数

标签 统计

angular ×1

angular2-highcharts ×1

highcharts ×1