1 thought on “Radar charts need a logarithmic scale type option

  1. I was able to cheat a logarithmic scale doing the following:

    So on the data, before I gave it to the chart, I used

    Math.log(data) / Math.log(2)

    Then in the chart options (edited for brevity), I did….

    options: {
    scale: {

    ticks: {
    userCallback: function (value, index, values) {
    Math.round(Math.pow(2,value)); //SO this will make the scale a logrithmic
    },
    }
    },
    tooltips: {
    callbacks: {
    label: function(tooltipItems, data) {
    return fullLabelArray[tooltipItems.index] +’: ‘ + Math.pow(2,tooltipItems.yLabel).toFixed(2); //This will make the tooltip data back to the original value
    }
    }
    }

    Just posting this in case it will help someone in the future.

Comments are closed.