score:3
first of all, i like the idea of cms controllable highcharts! it's something i've done before too.
rather than have users enter all data points for a particular city (12 points: one for each month), i thought it'd be more intuitive to have users enter the data points for each month (4 points: one for each city).
personally, i think that's a bit counter intuitive. if you add another city, then a new value box pops up in 12 different places. whereas you could have a nice ajax process or something at the end of the input screen which allows the wordpress cms user to add another city dynamically, and entering the 12 new values in one place.
anyway, i don't know your website so your way could be more intuitive. for your specific problem, you can think of your array of arrays as a matrix - you just need to make them officially an array of arrays rather than lots of single arrays.
then you can use array_map to solve your problem:
$matrix = [
[49.9, 83.6, 48.9, 42.4],
[71.5, 78.8, 38.8, 33.2],
[106.4, 98.5, 39.3, 34.5],
[129.2, 93.4, 41.4, 39.7]
];
array_unshift($matrix, null);
$matrix = call_user_func_array('array_map', $matrix);
this guy provides a really good explanation of this above php process (better than i could!).
Source: stackoverflow.com
Related Query
- How to Build a Column Chart in Highcharts with Data Entered Dynamically Within a CMS
- How to dynamically populate Highcharts column chart with two series
- How to format my json data for stack column chart in HighCharts
- How to change color of bar in column chart with different level of percentage in highcharts
- How to make split grouped column bar chart in highcharts with percentage?
- HighCharts column chart populated with series data from a function
- Highcharts column chart with data from mongodb
- How to have multiple highcharts with different series data in vuejs without repeating code
- highcharts column : add dynamically series with drilldown data
- Highcharts cloud issue with data source when duplicating chart
- how to make chart real time with 2 line and get data from php with highcharts
- How to draw scatter chart with highcharts using timeseries data
- create column chart in highcharts dynamically from json data
- Highcharts - Column chart with legend for each data
- How to Create a Stacked Column Chart with Dynamic Series in Highcharts
- How to use trellis chart with stacked column in Angular 10 using Highcharts
- How can I put text within horizontal bar chart data points using Highcharts as well as adding text underneath each data point? Example below:
- How to display extra data in highcharts bubble chart tooltip with datetime x-axis
- How to get column chart in angular using highcharts using dynamic data
- How to create a column range chart in Highcharts using range and navigator functions?
- How do you change the colour of each category within a highcharts column chart?
- Reload chart data via JSON with Highcharts
- Highcharts - how to have a chart with dynamic height?
- How do I dynamically change a data point in Highcharts using JavaScript
- How to show a column with the value Zero in Column chart in Highcharts?
- Highcharts : Chart with drilldown how to obtain click event of drill up button
- Highcharts Column chart with drilldown, remove hyperlink like formatting from x-axis labels
- How to structure Angular with Highcharts and lots of dynamic data
- Add dynamic data to line chart from mysql database with highcharts
- How get data name in Highcharts pie chart legend instead of "Slice" using array of values?
More Query from same tag
- R forecast autoplot or hchart
- How to insert overlay images in HighMaps (or HighCharts) which scale with the map
- javascript and highcharts was not getting in ajax response
- JSON api timestamp + data parsing
- Highcharts: Remove extra margin y-axis when plotting multiple series
- Drawing 3D bar charts using Highcharts through JS
- I want to add a line from each part in column in a Highcharts stacked column chart
- Equaling max value in two side of graph in highcharts.js
- Highcharts Polar Chart: Multiple pane segment colors
- How to highlight items in scatter plot in highcharts
- Parsing jQuery XML object into Highcharts
- Highcharts highstocks - Dual chart axis issue
- Highcharts MTD (Month to Date) and QTD (Quater to Date) implementation
- Loading JSON string into a pie chart in highcharts
- Highcharts x-axis cannot be seen when range is huge
- How to fill dynamic json value in drill down highchart
- Displaying ajax data in a graphical representation using high charts
- How to merge two Highcharts container with the same legend-item
- Hide or Disable Legend or Label in the end Highcharts line
- drawing multi colored custom symbols in highcharts
- Highcharts - How to change display data and remove mouseover?
- highstock chart when loading via ajax has jerky behavior
- removing pie chart outline text
- Showing a bar chart with expected value and current value for a series
- HighCharts Line xas datetime
- How to loop the data[] series with php and mysql
- Highchart datetime-XAxis export is different from the page
- How to show highchart coloraxis min max value?
- accentued character Encoding issue with highcharter in Shiny
- Adding an empty series changes axis minimum value