Sign In Register

How can we help you today?

Start a new topic
Answered

How to make a chart from a leaderboard using the new Manage tab?

Using the new Manage tab, I want to create a leaderboard with (Number Of Players) in the y axis, and (Score) in the x axis (i.e. I want to see a chart of the number of players having each particular score). There doesn't seem to be a simple way to do this using the charts tab, but is it still possible in some other way?


Thanks


Best Answer

I figured out how to display charts using custom data, supply the data you want and put this in the handlebars section


  

<div id="chart"></div>

<script>
var chart = c3.generate({
    data: {
        x: 'x',
        columns: [
            ['x', 30, 50, 100, 230, 300, 310],
            ['data1', 30, 200, 100, 400, 150, 250],
        ]
    }
});
</script>

  


1 person has this question
1 Comment

Answer

I figured out how to display charts using custom data, supply the data you want and put this in the handlebars section


  

<div id="chart"></div>

<script>
var chart = c3.generate({
    data: {
        x: 'x',
        columns: [
            ['x', 30, 50, 100, 230, 300, 310],
            ['data1', 30, 200, 100, 400, 150, 250],
        ]
    }
});
</script>