Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: Simple Bar Chart
#46808
Simple Bar Chart 11 Years, 6 Months ago Karma: 0
Hi all,

how would I go about doing a simple bar chart with the arijdatavisualizer (I'm using an SQL query as a base but that shouldn't matter here)? All the examples I find have more than one dimension (i.e. multiple columns).



cheers
Fred
Last Edit: 2013/12/17 00:18 By frederik.Reason: Added bar chart
The administrator has disabled public write access.
 
#46812
Re:Simple Bar Chart 11 Years, 6 Months ago Karma: 764
Hello,

The following plugin code:

Code:


{arijdatavisualizer type="bar" hideTable="true" width="500" height="400"}
<table>
<thead>
<tr>
<td></td>
<th>Count</th>
</tr>
</thead>
   <tbody>
<tr>
<th>2009</th>
<td>2</td>
</tr>
<tr>
<th>2010</th>
<td>4</td>
</tr>
<tr>
<th>2011</th>
<td>5</td>
</tr>
<tr>
<th>2012</th>
<td>6</td>
</tr>
   </tbody>
</table>
{/arijdatavisualizer}



will be rendered as:



Regards,
ARI Soft
The administrator has disabled public write access.
 
#46813
Re:Simple Bar Chart 11 Years, 6 Months ago Karma: 0
Thanks for the quick response. I got my sql table to your format now (just in case anyone finds this useful).

Code:

{arijdatavisualizer type="bar" hideTable="true" width="400" height="400"}
{arisqltable}
    {arisqltablecolumns}
      {arisqltablecolumn id="Jahr" alias="Jahr" headCellTag="td" cellTag="th"}
      {arisqltablecolumn id="Anzahl" alias="Anzahl"}
    {/arisqltablecolumns}
    {arisqltablequery}
SELECT YEAR(birthdate) as Jahr, count(*) as Anzahl FROM joomla_contentbuilder_list_records statelinks, joomla_contentbuilder_list_states states, joomla_zp_waitinglist wlist 
WHERE statelinks.state_id = states.id AND states.title = 'Aufgenommen' AND wlist.id = statelinks.record_id GROUP BY YEAR(birthdate);
    {/arisqltablequery}
{/arisqltable}
{/arijdatavisualizer}



However, the style is a bit messed up (probably because my theme resets a lot of basic css). Is there any recommendation on how to proceed? Otherwise I'll have to go through each property to see what is messing up my graph.
Last Edit: 2013/12/17 10:24 By frederik.
The administrator has disabled public write access.
 
#46814
Re:Simple Bar Chart 11 Years, 6 Months ago Karma: 764
Try to wrap plugin code with the following HTML code:

Code:


<div style="margin: 20px;">
... plugin code goes here ...
</div>



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1