Home Forums Report Bugs Bar chart problem in IOS

Bar chart problem in IOS

Viewing 3 posts - 1 through 3 (of 3 total)
  • #37914

    Pie, doughnut working fine in ios. But bar and line chart problem. error JSON.stringify()ing argument: TypeError: JSON.stringify cannot serialize cyclic structures.

    #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();

    #37936

    @punniyamoorthy,

    Chart seems to be working fine with the chart-options that you have shared. Can you kindly create sample project reproducing the issue you are facing & share it with us over Google-Drive or Onedrive so that we can look into the complete code, run it locally to understand the scenario better and help you out?


    Vishwas R
    Team CanvasJS

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.