当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript amcharts3-angular.AmChartsService类代码示例

本文整理汇总了TypeScript中@amcharts/amcharts3-angular.AmChartsService的典型用法代码示例。如果您正苦于以下问题:TypeScript AmChartsService类的具体用法?TypeScript AmChartsService怎么用?TypeScript AmChartsService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AmChartsService类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: ngOnDestroy

  ngOnDestroy() {
    clearInterval(this.timer);

    // Cleanup chartdiv2
    if (this.chart2) {
      this.AmCharts.destroyChart(this.chart2);
    }
  }
开发者ID:amcharts,项目名称:amcharts3-angular2,代码行数:8,代码来源:app.component.ts

示例2: setInterval

    this.timer = setInterval(() => {
      // Update chartdiv1
      this.options = this.makeOptions(this.makeRandomDataProvider());

      // Update chartdiv2
      this.AmCharts.updateChart(this.chart2, () => {
        this.chart2.dataProvider = this.makeRandomDataProvider();
      });
    }, 3000);
开发者ID:amcharts,项目名称:amcharts3-angular2,代码行数:9,代码来源:app.component.ts

示例3: ngOnDestroy

 ngOnDestroy() {
   this.AmCharts.destroyChart(this.chart);    
   this.AmCharts.destroyChart(this.chart2);
 }
开发者ID:WV-no7,项目名称:Angular-stuff,代码行数:4,代码来源:app.component.ts

示例4: ngOnInit

  ngOnInit() {
    this.chart = this.AmCharts.makeChart("chartdiv", {
    "type": "serial",
    "theme": "light",
    "legend": {
        // "useGraphSettings": true,
        "enabled": false
    },
    "dataProvider": [{
        "year": 1930,
        "italy": 1,
        "germany": 5,
        "uk": 3
    }, {
        "year": 1934,
        "italy": 1,
        "germany": 2,
        "uk": 6
    }, {
        "year": 1938,
        "italy": 2,
        "germany": 3,
        "uk": 1
    }, {
        "year": 1950,
        "italy": 3,
        "germany": 4,
        "uk": 1
    }, {
        "year": 1954,
        "italy": 5,
        "germany": 1,
        "uk": 2
    }, {
        "year": 1958,
        "italy": 3,
        "germany": 2,
        "uk": 1
    }, {
        "year": 1962,
        "italy": 1,
        "germany": 2,
        "uk": 3
    }, {
        "year": 1966,
        "italy": 2,
        "germany": 1,
        "uk": 5
    }, {
        "year": 1970,
        "italy": 3,
        "germany": 5,
        "uk": 2
    }, {
        "year": 1974,
        "italy": 4,
        "germany": 3,
        "uk": 6
    }, {
        "year": 1978,
        "italy": 1,
        "germany": 2,
        "uk": 4
    }],
    "valueAxes": [{
        "integersOnly": true,
        "maximum": 6,
        "minimum": 1,
        "axisAlpha": 0,
        "dashLength": 5,
        "gridCount": 10,
        "position": "left",
        "title": "Place taken"
    }],
    "listener":[],
    "startDuration": 0.5,
    "graphs": [{
        "balloonText": "place taken by Italy in [[category]]: [[value]]",
        "bullet": "round",
        "hidden": true,
        "title": "Italy",
        "valueField": "italy",
		"fillAlphas": 0
    }, {
        "balloonText": "place taken by Germany in [[category]]: [[value]]",
        "bullet": "round",
        "title": "Germany",
        "valueField": "germany",
		    "fillAlphas": 0
    }, {
        "balloonText": "place taken by UK in [[category]]: [[value]]",
        "bullet": "round",
        "title": "United Kingdom",
        "valueField": "uk",
		    "fillAlphas": 0
    }],
    "chartCursor": {
        "cursorAlpha": 0,
        "zoomable": false,
        "categoryBalloonEnabled":false
//.........这里部分代码省略.........
开发者ID:WV-no7,项目名称:Angular-stuff,代码行数:101,代码来源:app.component.ts

示例5: ngOnInit

  ngOnInit() {
    this.chartData1 = new Object(this.commonChartPart());
    this.chartData1.graphs.push({
        "balloonText": "place taken by Italy in [[category]]: [[value]]",
        "bullet": "round",
        "hidden": true,
        "title": "Italy",
        "valueField": "italy",
		    "fillAlphas": 0
    }, {
        "balloonText": "place taken by Germany in [[category]]: [[value]]",
        "bullet": "round",
        "title": "Germany",
        "hidden": true,
        "valueField": "germany",
		    "fillAlphas": 0
    }, {
        "balloonText": "place taken by UK in [[category]]: [[value]]",
        "bullet": "round",
        // "type":"column",
        "title": "United Kingdom",
        "valueField": "uk",
		    "fillAlphas": 0.2
    })
    this.chartData1.marginTop=5;
    this.chartData1.marginBottom=0;
    debugger;

    this.chartData1.valueAxes.push({
        "integersOnly": true,
        "maximum": 6,
        "minimum": 1,
        "axisAlpha": 0,
        "fontSize": 10,
        "dashLength": 5,
        "gridCount": 10,
        "position": "left",
    })

    this.chartData1.categoryAxis = {
      "labelsEnabled":false,
    }


    this.chart = this.AmCharts.makeChart("chartdiv", this.chartData1);

    this.chartData2 = new Object(this.commonChartPart());
    this.chartData2.graphs.push({
        "balloonText": "place taken by Italy in [[category]]: [[value]]",
        "bullet": "round",
        "hidden": true,
        "title": "Italy",
        "valueField": "italy",
		    "fillAlphas": 0
    }, {
        "balloonText": "place taken by Germany in [[category]]: [[value]]",
        "bullet": "round",
        "title": "Germany",
        // "type": "column",
        "valueField": "germany",
		    "fillAlphas": 0.2
    }, {
        "balloonText": "place taken by UK in [[category]]: [[value]]",
        "bullet": "round",
        "title": "United Kingdom",
        "hidden": true,
        "valueField": "uk",
		    "fillAlphas": 0
    })

    this.chartData2.marginTop = -1
    this.chartData2.marginBottom = 4

    this.chartData2.valueAxes.push({
        "integersOnly": true,
        "maximum": 6,
        "minimum": 1,
        "reversed": true,
        "axisAlpha": 0,
        "fontSize": 10,
        "dashLength": 5,
        "gridCount": 10,
        "position": "left"
    })
    this.chartData2.categoryAxis = {
      "labelsEnabled":false,
      "position":"top"
    }


  this.chart2 = this.AmCharts.makeChart("chartdiv2", this.chartData2);
  }
开发者ID:WV-no7,项目名称:Angular-stuff,代码行数:92,代码来源:app.component.ts


注:本文中的@amcharts/amcharts3-angular.AmChartsService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。