Forum Replies Created by Punniyamoorthy

Viewing 1 post (of 1 total)
  • in reply to: Bar chart problem in IOS #37924

    // sample data
    [
    {
    “y”: -2184,
    “name”: “AJM – Ajman”,
    “color”: “rgb(149,245,254)”
    },
    {
    “y”: -587890,
    “name”: “AR – ARMENIAN”,
    “color”: “rgb(75,44,36)”
    },
    {
    “y”: -1619543,
    “name”: “BK – BANGKOK”,
    “color”: “rgb(147,26,195)”
    },
    {
    “y”: -50656609,
    “name”: “DXB – Dubai”,
    “color”: “rgb(252,224,22)”
    },
    {
    “y”: 0,
    “name”: “DXB – Dubai”,
    “color”: “rgb(33,37,175)”
    },
    {
    “y”: -11109386,
    “name”: “DXBE – Dubai For Export”,
    “color”: “rgb(123,160,86)”
    },
    {
    “y”: -9651,
    “name”: “EG – EGYPT”,
    “color”: “rgb(178,203,226)”
    },
    {
    “y”: -90866,
    “name”: “HKK – Hong Kong”,
    “color”: “rgb(183,254,191)”
    },
    {
    “y”: -2442760,
    “name”: “HNK – HONG KONG”,
    “color”: “rgb(4,244,113)”
    },
    {
    “y”: -79716796,
    “name”: “IN – INDIA”,
    “color”: “rgb(51,165,35)”
    },
    {
    “y”: 0,
    “name”: “IN – INDIA”,
    “color”: “rgb(175,228,21)”
    },
    {
    “y”: 11657,
    “name”: “LB – LEBNON”,
    “color”: “rgb(187,164,144)”
    },
    {
    “y”: 4679,
    “name”: “RU – RUSSIA”,
    “color”: “rgb(171,161,9)”
    },
    {
    “y”: 3215,
    “name”: “RUS – Russia”,
    “color”: “rgb(165,40,177)”
    },
    {
    “y”: -8804,
    “name”: “TUR – Turkey”,
    “color”: “rgb(153,81,3)”
    }
    ]

    // my code

    this.pieChart = new CanvasJS.Chart(this.canvajsChart.nativeElement, {
    theme: “light2”,
    animationEnabled: true,
    data: [{
    type: this.startGraph,
    showInLegend: false,
    toolTipContent: “<b>{name}</b>: {y} (#percent%)”,
    dataPoints:
    this.pieLablesCanvas
    }]
    });
    this.pieChart.render();

Viewing 1 post (of 1 total)