0

I have a JSON file which is my mock data, I have to show summation of Y-Axis values and show it in ngx-Chart

[

{
"name": "2018", //X-Axis
"series": [
  {
    "name": "Column1", //Y-Axis
    "value": 5
  },
  {
    "name": "Column2", //Y-Axis
    "value": 7
  }
]
},

{
"name": "2018", //X-Axis
"series": [
    {
    "name": "Column1", //Y-Axis
    "value": 1
    },
    {
    "name": "Column2", //Y-Axis
    "value": 7
    }
  ]
 }
]

I need to Sum of Column1 and Column 2, but in ngx-chart its just show only max-value column, in my case column1

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Adnan
  • 814
  • 12
  • 38
  • Do you need to sum the y axis across all of the series? – Polymer Jun 04 '17 at 03:51
  • @Polymer Yes, I need to sum the y-axis across all if the same equal X-axis series. if I have the third item in my JSON with X-Axis = 2017, I don't want it in summation – Adnan Jun 04 '17 at 03:54

0 Answers0