HighCharts Editor插件示例不起作用

时间:2017-02-16 15:22:08

标签: highcharts highcharts-editor

所以我有用于Highcharts的jquery-simple-rest插件,(在示例文档中使用了相同的插件)。我已经链接了js文件,并且在我的浏览器中没有出现任何错误。文档中还提到了highed.use。

//The installer
highed.plugins.editor.install("jquery-simple-rest",{

//Contains information about the plugin - optional
meta:{
    version:"1.0.0",
    author:"Highsoft",
    homepage:"https://github.com/highcharts/highcharts-editor/plugins/jquery-simple-rest.js"
},

//Add additional external dependencies here
dependencies:[
    "https://code.jquery.com/jquery-3.1.0.min.js"
],

//This is the prototype options which the plugin accepts
options:{
    url:{
        required:!0,
        type:"string"}
},

//Called when the chart changes
chartchange:function(e,t)
{jQuery.ajax({
    url:t.url,
    data:e.json,
    dataType:"json",
    type:"post"
    ,success:function(){
        highed.snackBar("CHART SAVED")
    },
    error:function(e,t){
        highed.snackBar("unable to save chart: "+t)
    }
   })
  }
});


highed.plugins.editor.use('jquery-simple-rest', {options:{
    url:{
        required:!0,
        type:"string"}
    },
  }
);

我无法让这个插件出现在我的编辑器中,并且不知道我做错了什么。

链接到示例:https://github.com/highcharts/highcharts-editor/wiki/Plugins

0 个答案:

没有答案