Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to extend Sparklis #13

Open
Maheen-Bakhtyar opened this issue Dec 15, 2022 · 7 comments
Open

Possibility to extend Sparklis #13

Maheen-Bakhtyar opened this issue Dec 15, 2022 · 7 comments

Comments

@Maheen-Bakhtyar
Copy link

Bonjour Sébastien Ferré,

First of all, thanks for this amazing tool!

I am interested to in using Sparklis for my research work and I am curious if there is a possibility to extend and modify the interface of Sparklis?
Is there anything in the pipeline to make it more user-friendly? Or if you could share how this can be done.
Can you please share how to implement templates? and what are the possibilities to do that?

Thank you very much

Regards
Maheen

@sebferre
Copy link
Owner

Bonjour Maheen-Bakhtyar,
there is a JS API for extending and customizing Sparklis.
Have a look at https://github.com/sebferre/sparklis/blob/master/doc/main.md .
Keep in mind that this JS API is under progress, feedback welcome.
Regards

@Maheen-Bakhtyar
Copy link
Author

Bonjour,
Thank you for letting me know about this.
I am hopeful it will be helpful for my work.
Regards

@Maheen-Bakhtyar
Copy link
Author

Bonjour Sébastien Ferré,
I looked at the documentation https://github.com/sebferre/sparklis/blob/master/doc/main.md that you provided.
It gives a detail of all the functions that we can use.
It would be really helpful if you could also provide one basic example of how we can use it.
I searched on the Internet but was unable to find an example as a starting point.
It will be really helpful to go further if there is one example, please.
Can you please help me and provide a simple example of how I can use a JS API in my code?
Merci Beaucoup

@sebferre
Copy link
Owner

Sorry, I don't yet have proper examples of use of the API.

@Maheen-Bakhtyar
Copy link
Author

No problem.
Let me share one soon :-)

Merci

@CaptSolo
Copy link

CaptSolo commented May 5, 2023

@sebferre : Does Sparklis JS API (mentioned above) allow us to add a new menu item to the horizontal menu that is used for switching between Sparklis, YASGUI and History views?

image

This ability would be useful, for example, for showing a visualization of the generated SPARQL query.

P.S. Thank you for this great application!

@sebferre
Copy link
Owner

@CaptSolo : yes, this is possible.

  1. Duplicate and adapt the HTML code in osparklis.html for e.g. the YASGUI view (look for yasgui-view). There are two components: the button and the div containing the view.
  2. Use the function sparklis_extension.hookSparql from the JS API to define some behavior when a new SPARQL query is defined, e.g. filling the new view with a graphical representation of the query.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants