Wikidata:SPARQL query service/Wikidata Query Help/Result Views: Difference between revisions

Content deleted Content added
Marked this version for translation
→‎Map: add options
(3 intermediate revisions by the same user not shown)
Line 51:
<translate><!--T:22-->
'''Rows containing no image will be ignored'''.
 
=== Options ===
 
{| class="wikitable"
! Option name
! Type
! Description
|-
| <code>hide</code>
| One or more variable names (strings, starting with <code>?</code>), single value or array
| Don’t show these variables in the result.
|}
 
== Map == <!--T:23-->
Line 88 ⟶ 100:
 
<translate>
 
=== Options ===
 
{| class="wikitable"
! Option name
! Type
! Description
|-
| <code>hide</code>
| One or more variable names (strings, starting with <code>?</code>), single value or array
| Don’t show these variables in the result.
|-
| <code>layer</code>
| One or more variable names (strings, starting with <code>?</code>), single value or array
| Use these variables for the map layer, instead of the default <code>?layerLabel</code>, <code>?layer</code>.
|-
| <code>markercluster</code>
| boolean or object
|
* If the value is an object, pass these options to [https://github.com/Leaflet/Leaflet.markercluster/ Leaflet.markercluster], a map plugin for clustering nearby map markers. (If the value is the empty object <code>{}</code>, Leaflet.markercluster is enabled with its default options.)
* If the value is <code>true</code> (default for queries without map layers), Leaflet.markercluster is enabled with a special set of options that doesn’t cluster any nearby map markers (it only “spiderfies” markers with ''exactly'' identical coordinates) and attempts to replicate the default map look as much as possible.
* If the value is <code>false</code> (default for queries with map layers), Leaflet.markercluster is not enabled.
|}
 
== Line, Bar, Scatter and Area Chart == <!--T:39-->
 
Line 260 ⟶ 296:
 
<translate>
 
=== Options ===
 
{| class="wikitable"
! Option name
! Type
! Description
|-
| <code>hide</code>
| One or more variable names (strings, starting with <code>?</code>), single value or array
| Don’t show these variables in the result.
|}
 
== Dimensions == <!--T:111-->
</translate>
Line 489 ⟶ 538:
<syntaxhighlight lang="sparql">
#defaultView:ImageGrid
</syntaxhighlight>
 
<translate>
=== Result view options ===
 
Result views can be configured with various options, which are specified in {{Q|Q2063}} format,
either following the <code>defaultView</code> comment (see previous section)
or following a separate <code>view</code> comment.</translate>
 
<syntaxhighlight lang="sparql">
#defaultView:Map{"layer": "?typeLabel"}
#view:ImageGrid{"hide": "?coords"}
</syntaxhighlight>