AnsweredAssumed Answered

Extract Specific Data From JavaScript Array

Question asked by laguna92651 on Oct 30, 2018
Latest reply on Oct 31, 2018 by user19752

I created the following array from a FM table with a script to plot data in a C3 library pie chart.

['Janessa', 316, 824, 105],

['Kaitlin', 0, 4025, 300],

['Lauren', 459, 5094, 678],

['Nick', 0, 947, 976]

 

Each number is data for a year, 2016, 2017, 2018].

How can I use a radio button or drop down to select the year to extract for use in a pie chart. If I were to plot year 2017 I need the array to be in this format to plot the pie chart in C3.

 

['Janessa', 824],

['Kaitlin', 4025],

['Lauren', 5094],

['Nick', 947]

Outcomes