Estoy tratando de construir un gráfico polar donde puedes agregar ejes dinámicamente desde el lado del servidor de un conjunto de datos (he reducido el código al mínimo)
Esto es lo que he intentado hacer hasta ahora:
function loadToRadar(chart){ // if type of chart == 'undefined', we initialize a new chart if ( typeof radarChart == 'undefined'){ radarChart = initializeRadarChart(chart, this); return } // add new xAxis category let newCategories = chart.xAxis[0].categories; newCategories.push(newColumnCat); chart.xAxis[0].setCategories(newCategories); // add new yAxis chart.addAxis( { min : newMin, max : newMax, showLastLabel : true, gridLineInterpolation: 'polygon', }, false // is X axis? ); // add new point to series chart.series[0].addPoint([newMean]) // access the original series and addpoint } var chart; function initializeRadarChart(chart, column){ console.log('initializeRadarChart called'); chart = Highcharts.chart('radar-chart', { chart: { parallelCoordinates: true, parallelAxes: { gridLineWidth: 1 }, polar: true }, xAxis: { categories: [ column.columnCat ], tickmarkPlacement :'on', labels: { style: { color: 'black' } } }, yAxis: [ { min : this.min, max : this.max, showLastLabel : true, gridLineInterpolation: 'polygon', }, ], series: [ { name :'firstSeries', data : 5 //random num }, ] }); return chart; }Esta es la imagen de salida:
Como puede ver, los puntos de la serie se cargan para la categoría correcta, pero solo se muestran en la línea original.
Se agregó un jsfiddle de muestra
Gracias por la demostración. Eché un vistazo más de cerca a este problema y me parece un error. Lo informé en el canal de problemas de Highcharts GitHub, donde puede seguir los hilos o preguntar a los desarrolladores principales por la solución.