Dienstag, 30. Januar 2018

Manipulate Oracle Jet Chart X-axis at runtime

let say, we have that below Oracle Jet Line Chart and we want to remove the number in the x-axis after the Page Load



How to do it?

1- Give your Oracle Jet Chart Region a static ID

Example: mychart

2- Create a DA After Refresh on the Chart and add as Action the below JS Code

var g = $('#mychart_jet').ojChart("option", "groups");

 

// Remove any text before space in the group array

for (var i=0; i<g.length; i++) {

    var s = g[i].name.indexOf(' ');

    if (s > -1) {

        g[i].name = g[i].name.substr(s+1);

    }

}


// Apply the new group array to the chart

$('#mychart_jet').ojChart({groups: g});



Demo

https://apex.oracle.com/pls/apex/f?p=61549:32



Keine Kommentare:

Kommentar veröffentlichen