SemanticMediaWiki / SemanticResultFormats

Provides additional visualizations (result formats) for Semantic MediaWiki
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Result_Formats
Other
45 stars 75 forks source link

Some issue with jqplotchart #696

Closed Bagrat1on closed 2 years ago

Bagrat1on commented 2 years ago

Setup

Issue

Hi, I am a new SMW and SRF user and need some help! I tried to repeat an example of a chart from here but it does not work for my wiki and I don't know why.

Steps to reproduce

I have a [[Category:City]] and 4 cities inside: Berlin, Munchen, London, Moskow. Each city page have similar text:

[[Located in::Germany]]
[[Population::1234979]]  
[[Average rainy days::130]]
[[Area::87600]]
[[Category:City]]

On page of Category:City I write: {{#ask:[[Category:City]] | ?Population | ?Average rainy days | ?Area}} and have a result: image It's working, but when I try to use a chart:

{{#ask:[[Category:City]]
|?Population
|format=jqplotchart
|link=all
|headers=show
|searchlabel=… further results
|distributionsort=none
|direction=vertical
|numbersaxislabel=Population
|height=400
|width=50%
|valueformat=%d
|ticklabels=1
|theme=simple
|filling=1
|chartlegend=none
|datalabels=percent
|charttype=bar
}}

I have a warning about data: "Warning The requested data cannot be displayed due to insufficient selection criteria."(c) Translator But when a add |distribution=yes to parameters, I have: image The same problem with other charts formats excluding googlepie and googlebar - they are working well. I think the problem is in data format, but I can't be sure and don't know how to fix it. Please help me to solve this problem. Link to my test wiki on temporary hosting (becoz sandbox is not avaible). I'm newbee on Git and if I was wrong in the place for my simple question - please tell me where to go.

JeroenDeDauw commented 2 years ago

Looks like your properties are not of type number. Hence the red numbers (with links to non-existing pages) in the table. Properties are of type page by default and they should be of type number for your.

Bagrat1on commented 2 years ago

Looks like your properties are not of type number. Hence the red numbers (with links to non-existing pages) in the table. Properties are of type page by default and they should be of type number for your.

Thank you! I didn't even know properties have types.