Buy Now
Sign in

how it works chart widget?

samir1903 , November 16 2018, 23:10
S
samir1903 175
November 16 2018, 23:10 #381547
hi everyone?
it is in chronoforms 6
I couldnot make work chart element
i put data provider
curso is checked boxes element
inside there is contabilidad and mercadeo
i want to show in a graph of how many contabilidad and how many mercadeo in table
i could not
data reader is read_data15
module is Data15
Data provider: {var:read_data15.[n].Data15}
X Field name: curso
Y Field name: result.curso
healyhatman 7
November 17 2018, 03:14 #381551
Post your debug (without the chart)
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
samir1903 175
November 26 2018, 18:37 #381786
this is not working error
healyhatman 7
November 26 2018, 20:40 #381789
Need more details
What error, did you take out the chart widget like I said?
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
samir1903 175
November 27 2018, 13:52 #381804
1.png
4.png
2.png
3.png

5.png
Attachments
1.png
1.png
(12.65 KiB)
139 Downloads/Views
2.png
2.png
(8.63 KiB)
138 Downloads/Views
1.png
1.png
(12.65 KiB)
194 Downloads/Views
2.png
2.png
(8.63 KiB)
187 Downloads/Views
3.png
3.png
(17.77 KiB)
185 Downloads/Views
4.png
4.png
(11.78 KiB)
137 Downloads/Views
5.png
5.png
(5.91 KiB)
184 Downloads/Views
4.png
4.png
(11.78 KiB)
192 Downloads/Views
S
samir1903 175
November 27 2018, 18:08 #381807
I have found the answer for those who is saffuring the same issue
X field name returns values
Y field names return numbers therefore
X field names will be curso
Y field names will be Count(*) so it can count the records
i gues there is really lack of information in terms of chronoforms components and features published, i am looking basic things but i cannot finds some times in any where
thsnks
S
samir1903 175
November 27 2018, 18:09 #381808
also do not forget to put
fields to retriew in DB read
curso
Count(*)
healyhatman 7
November 27 2018, 20:33 #381809
Well yes if you want to display the count you need to retrieve the count, that's not really chronoforms fault. Glad you figured it out.
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
samir1903 175
December 03 2018, 20:40 #381984
So how to filter if count in filter is higher then 3
having count(*)>3
does not work for me there
healyhatman 7
December 03 2018, 20:42 #381985
Count(*)/>3:model.field
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
samir1903 175
December 03 2018, 20:55 #381986
Thanks for quick answer but it didint work for me
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''comuna' GROUP BY `Data36.comuna`' at line 1
healyhatman 7
December 03 2018, 21:19 #381987
OK so apparently you need to use the HAVING clause and I don't think CF can handle that. I could be wrong, but in the meantime you have two options.
1) use a PHP block to take your array from $this->get("read_data#") and return an array of entries with count > 3
2) Make the database query yourself in PHP. https://docs.joomla.org/Special:MyLanguage/Selecting_data_using_JDatabase
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
samir1903 175
December 04 2018, 17:32 #382012
with custom_code12
<?php$app =& JFactory::getApplication();
$db =& JFactory::getDBO();
$query = " SELECT `comuna`,count(*) FROM `os5pk_chronoforms_xxx` WHERE `cumplen` = 'SI' GROUP BY `comuna` HAVING COUNT(*)> 3;";
$db->setQuery($query);
$row = $db->loadAssocList();
print_r($row);
return $row?>
i can see the results that i want with second method
Array ( [0] => Array ( [comuna] => [count(*)] => 37 ) [1] => Array ( [comuna] => 1 [count(*)] => 7 ) [2] => Array ( [comuna] => 11 [count(*)] => 6 ) [3] => Array ( [comuna] => 12 [count(*)] => 6 ) [4] => Array ( [comuna] => 13 [count(*)] => 8 ) [5] => Array ( [comuna] => 14 [count(*)] => 4 ) [6] => Array ( [comuna] => 15 [count(*)] => 23 ) [7] => Array ( [comuna] => 16 [count(*)] => 6 ) [8] => Array ( [comuna] => 18 [count(*)] => 8 ) [9] => Array ( [comuna] => 20 [count(*)] => 4 ) [10] => Array ( [comuna] => 21 [count(*)] => 15 ) [11] => Array ( [comuna] => 4 [count(*)] => 4 ) [12] => Array ( [comuna] => 6 [count(*)] => 6 ) [13] => Array ( [comuna] => 7 [count(*)] => 5 ) )
but i do not know how to make it work in chart widget
S
samir1903 175
December 04 2018, 17:33 #382013
i put {var:custom_code12.$row['2']}
to data provider
x field: comuna
y field: count(*)
does not work
S
samir1903 175
December 04 2018, 19:12 #382014
easier way is order comuna/desc
and disabled 3 records
healyhatman 7
December 04 2018, 20:38 #382018
Should be {var:custom_code12.[n].comuna.field_name}
You haven't actually given Count(*) a name.
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store