8 years ago
Topic

Hello,

    I try to display a very simple chart graph to understand how template work. So I have created a list with following parameters:

Data comes from following table:

The result is the following

Value are near of fields content but not the real value and legend not filled.

I have tried lot of possibilities without result.

Could you help me

Thank you

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
1
Level 1

Hi,

in template configuration you probably need to select Separated mode, grouped will try to group your columns.

8 years ago
0
Level 2

Hello,

   With Separated mode, nothing is displayed. I have tried with different chart type with the same result, nothing is displayed. Value storage into database are Varchar for Datatext and float for value. I use Text Field linked with the database field into Table List. Is it correct ?

Thank you

Gerard

4229 Posts
Kadministrator
8 years ago
1
Level 1

Is your data displayed when you use some other list template? e.g. when using table and your 2 fields as columns.

8 years ago
0
Level 2

Thank you for your answer.

Below result with Table -seb_table template:

I have only one value in the list, why ?

Find below parameters of Dynamic list:

------------------------------------------------

Parameter of fields composante:

-------------------------------------------------

and parameters of field value

If I select le chart template, I have the same result than above.

Note than I have updated Seblod on the last version. 3.8.4

Thank you

4229 Posts
Kadministrator
8 years ago
1
Level 1

Remove select dynamic from search type, you can't make a graph from a single row.

8 years ago
0
Level 2

Hi,

   I'm ok with you, but if I remove the dynamic search how I can select a list of items (depending of calling) into the source table ? I don't understand where and how insert (and build) the query.

Gérard

4229 Posts
Kadministrator
8 years ago
1
Level 1

Your select dynamic limits results to the one with single id, so you get only one row.

Also your select dynamic query is not correct, it must be constructed as this (your query is missing "AS text" and "AS value" parts.

SELECT Field_name_1 AS text, field_name_2 AS value FROM #__table
8 years ago
0
Level 2

Hi,

   I have tried with different SQL syntax as:

- select composante1 AS text, val_comp1 AS value from #__cck_store_graph_formule

- select * from #__cck_store_graph_formule

- and so on ....

I have also tried to build SQL with the constructor. In all case, only the last row is displayed (id=2)?

Is this problem can come from Select Dynamic component?

As reminder the content of the table

Gérard

4229 Posts
Kadministrator
8 years ago
1
Level 1

Hi,

select composante1 AS text, val_comp1 AS value from #__cck_store_graph_formule is correct if you wish to pick one record, but as soon as you do that you can't have chart as chart is made form ALL records.

Also in you screenshot you have made storage as standard-free-id, this actually means, that whatever value is selected, it will be inserted in the search as id, which is additionally incorrect, what happens is that you get in the search query "where id=10" or id=90, which matches no records.

aAnything in he search form will function as filter, what exactly is this select dynamic supposed to do here? Filter records by some column like id-formule ?

8 years ago
0
Level 2

Hi,

   In this case id is used as primary key, id_user and id_formule are used into clause where. The chart template shall display all lines returned by the query (between about 1 to 20)

  For this case is the select dynamic the right component to be used? Note that I have tried with storage set to "none" without a best result.

Thank you

Gérard

4229 Posts
Kadministrator
8 years ago
1
Level 1

chart template displays search results, not select dynamic query results. As a matnioned alredy you should get rid of that field. To do search you should put right fields in the search tab to get this results or/and use http://www.seblod.com/resources/tutorials/using-the-search-query-field-plugin ,

http://www.seblod.com/resources/manuals/advanced/understanding-search-join

8 years ago
0
Level 2

Hi,

   I have brought and used the Search Query Field, now chart template work fine.

Thank you very much for your help

Gérard

Get a VIP membership