Triply-Dev / YASGUI.YASR-deprecated

Deprecated, see https://github.com/TriplyDB/Yasgui for the Yasgui monorepo
MIT License
26 stars 22 forks source link

Add pivot export functionality #30

Closed LaurensRietveld closed 9 years ago

LaurensRietveld commented 9 years ago

Button should only be enabled for tables. Can use the csv export functionality of YASR, but need to do some tricks to resolve col and row spans. Preferably, wait and see whether this feature becomes available as part of pivottable (see PR https://github.com/nicolaskruchten/pivottable/pull/187)

nicolaskruchten commented 9 years ago

Check out http://nicolas.kruchten.com/pivottable/examples/mps_export.html :)

LaurensRietveld commented 9 years ago

@nicolaskruchten : Excellent, good to see! For consistency reasons, I'll probably modify some of your code in order to use it similarly as how current visualizations in YASR are exported.

nicolaskruchten commented 9 years ago

Cool. Please don't hesitate to pull-request back if you come up with a more consistent way to export... I had to make some editorial decisions...

LaurensRietveld commented 9 years ago

@nicolaskruchten : I've recently added my take on the pivot export functionality. To see it in action: go to yasr.yasgui.org, execute the query below (by pressing the play button in the query window), and select the pivot output. The download button either downloads an svg images when a google chart is selected, or downloads a csv for a regular table rendering. For the CSV downloads, I've opted for simply duplicating cells in the case of row and col spans. Not the most ideal solution, but I doubt there is any.. Not sure whether this is an approach you'd like to see in the pivot table plugin as well, but at least you can get to see it working in action ;)

a test query: SELECT DISTINCT ?type ?person WHERE { ?person a ?type . } LIMIT 10