Menu

Access new methods per JSNI

2015-01-27
2015-01-28
  • meisterlampe

    meisterlampe - 2015-01-27

    Hi,

    I would use GWT Highcharts if i can extend the functinality of GWT Highcharts with the new features of Highcharts4

    I know it is possible with writing own wrappers via JSNI.

    For Example, in the Highcharts api there is xAxis.toValue
    http://api.highcharts.com/highcharts#Axis.toValue
    which i need.
    I changed the Javascriptfiles to the new ones in my project (and changed the includes in the html file.

    i added this method for acessing the javascript method:

    public static native double axisToValue(JavaScriptObject axis,int point) /-{
    return axis.toValue(point,false);
    }-
    /;

    The problem is my JavascriptObjec of axis doesnt contain the toValue method.
    xAxis.getNativeAxis();

    Can someone give me some advices?

     
  • Shawn Quinn

    Shawn Quinn - 2015-01-27

    That syntax does look correct. You're calling that new method with the result from the xAxis.getNativeAxis() method? And, did you confirm that you have the latest version of highcharts.js in your page?

     
  • meisterlampe

    meisterlampe - 2015-01-28

    Ah sry was my bad, the browser chached the old Highcharts.js somehow.
    Its all working since i cleaned my browser cache.

    Thx

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.