Developing Grafana plugin

Hello, I’m working on my own directed graph Grafana plugin using vis.js. And maybe you can guide me with some hints. What is best way to deal with such problem, when I’m adding my plugin to grafana, visjs library starting to search for canvas to draw the graph but because of the way angular creates objects it can’t find it and fails. Also I’ve found angular-visjs directive but not sure how to add it to the whole grafana app.
Kind regards.

Thank you so much, those links really helped me. I have one more question, how can I add custom queries to the selected datasource to my plugin?

What do you mean by custom queries? Can you give an example?

Hello. I have a problem like goodkarma. I have been created my own plugin sucessfull, and I need to query some data from an webservice via an uri. I tested this query, making a test webpage, then I used Ajax jQuery GET command to query this datas and show out in a remote website. My queries return differente objects in json format. My question is how I created my datasource.js to query this datas and next show in a grafana time graph.

I have influxdb datasource, and need plugin to visualize data from this datasource.

@goodkarma can you give an example of a “custom query”?

@gaugustos sounds like you need the Simple JSON Data Source

Maybe, I wasn’t sure how to add panel for query constructing.
Also I’ve some problems with custom directives, I’m using visjs for my plugin. But as it won’t work (without some hacks) with angular, I have, which I’m importing in module.js. But even after I’ve added directives to grafana.directives module nothing happens.

@goodkarma can you clearly describe your problem, I am not sure exactly what you are having problems with.

I have angular directives angular-visjs in which I change module as it was in previous answer

and load this file with directives in module.js but it still doesn’t work. I’ve tried to write directive by myself just to check if it’s working with external file, but this directive doesn’t work either. May be there something else that I’ve misse?