.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. ================================================== .. DEFINE SOME TEXTROLES .. -------------------------------------------------- .. role:: underline .. role:: typoscript(code) .. role:: ts(typoscript) :class: typoscript .. role:: php(code) Getting data from queries ------------------------- Assume that we want to display the number of pages created per year on a TYPO3 website in a bar graph. Assume also that we decided to use the template "barradex1.xml" provided in the “Resources/Privates/Templates” directory of this extension. Displaying the template as described in the previous section leads to the following image. .. figure:: ../../Images/TutorialBarPlot.png The template code is the following: :: <Set title="Bar gradient (Left reflection)" ref_title="marker#title" /> <SetFont family="FF_VERDANA" style="FS_NORMAL" size="12" /> <SetColor color="darkred" /> As it can be seen, we may change the data set by means of the tags: :: The title and the background color can be changed by means of the tags: :: To obtain the data from queries, special tags must be introduced in the section as shown below: :: The tag refers to a reference attribute “ref” concerning the tag “query” whose “id” is 1. Another attribute concerns the field that should be used to collect the data. Then a query tag must be defined as follows: :: pages NOT deleted AND NOT hidden year Tags