This topic is locked

how to display a complete graph reflecting the view

12/29/2017 10:32:58 AM
PHPRunner General questions
H
htmalbenur author

hello, I would like help in a graph please. the first pic is the result obtained for the view:
SQL Code :
SELECT

Sexe,

COUNT(*) AS Total,

MONTHNAME(fn_nord.Date de remplissage) AS Mois,

YEAR(fn_nord.Date de remplissage) AS Année

FROM fn_nord

WHERE (Sexe ='Masculin' OR Sexe ='Féminin')

GROUP BY Sexe, MONTHNAME(fn_nord.Date de remplissage), YEAR(fn_nord.Date de remplissage)

ORDER BY YEAR(fn_nord.Date de remplissage), MONTHNAME(fn_nord.Date de remplissage)
https://ibb.co/nN2HRb
but I would like to represent this result on graph form, arriving in the pic 2 the program gives me that as result. how can i display a graph that can describe the reality of the view....
https://ibb.co/kA6cRb
thx very much for your help.

admin 12/29/2017

What is wrong with the current chart?

H
htmalbenur author 12/29/2017

it does not display the information related to the view, look at the results displayed and the graph, which he gave

H
htmalbenur author 12/29/2017

for the year 2015 I have the information for Man and woman and also for the year 2014 it should display information for Man and Woman, but so far I only have the info for 2015 man and woman and only 1 info for 2014

admin 12/29/2017

I do not have a complete picture here as there is no chart setup screenshot. I think the problem is that you have multiple duplicate entries here. You need to do some grouping to eliminate duplicates and then you can display aggregate data.

H
htmalbenur author 1/1/2018

hello Mr ADM and best wishes for the year 2018 and success with the project PHPRunner, as you advised me I do the grouping with the pic is the view of the grouping,
https://ibb.co/eTiM6b
but the graph does not reflect the Reality of sight, I would like an idea to make the correction.
https://ibb.co/mmudmb
thank you and happy new year 2018

jadachDevClub member 1/1/2018

You can use 2 charts - one for men, one for women. Or use a dashboard page with one chart with a filter.

H
htmalbenur author 1/2/2018

can you give me more explanation for the dashboard I plz.
Thx

Y
YCH 1/2/2018



can you give me more explanation for the dashboard I plz.
Thx


Have a close look at the values in your table(s) especially the "sexe" field !

You have "Masculin" and both Féminin ( with accent aigu) and Feminin (without accent aigu) as values ! That is why the "group by" is showing three graphs and wrong expected totals.
Yves.

H
htmalbenur author 1/3/2018

hello and thank you for your approach, but if you look good it's the male field that does not show, the feminine is ok, do you think it can give problems.
Thx

Y
YCH 1/4/2018

First have your "sexe" values in your table made consistent : I do not think you want "Féminin" and"Feminin" appear as separate values in the sexe field. So change all occurences of "Feminin" to "Féminin".
Double check if the sql for your table view and the chart are still the same or if you made any changes to it.

Also double check your chart setup.
**

Your original SQL:
SELECT

Sexe,

COUNT(
) AS Total,

MONTHNAME(fn_nord.Date de remplissage) AS Mois,

YEAR(fn_nord.Date de remplissage) AS Année

FROM fn_nord

WHERE (Sexe ='Masculin' OR Sexe ='Féminin')

GROUP BY Sexe, MONTHNAME(fn_nord.Date de remplissage), YEAR(fn_nord.Date de remplissage)

ORDER BY YEAR(fn_nord.Date de remplissage), MONTHNAME(fn_nord.Date de remplissage)


In this SQL

...

WHERE (Sexe ='Masculin' OR Sexe ='Féminin')

GROUP BY Sexe, MONTHNAME(fn_nord.Date de remplissage), YEAR(fn_nord.Date de remplissage)

...
You will count the number of records split by sexe (Masculin or Féminin excluding Feminin), monthname and year

H
htmalbenur author 1/4/2018

hello and again thank you for your comments, it was very useful for corrections, but now I would like to know:

  1. how to reduce the size of graphs, I think that we need to have more classy graphs
  2. In the peak 2, you see the year 2014 and in the peak 3 you see the year 2015, but now I would like to know how to do if:
    I want to present it's two years in a single graph.
    Thank you for your help.
    https://ibb.co/mKW36b

    https://ibb.co/hP636b

    https://ibb.co/iZPeew

Y
YCH 1/4/2018



hello and again thank you for your comments, it was very useful for corrections, but now I would like to know:

  1. how to reduce the size of graphs, I think that we need to have more classy graphs
  2. In the peak 2, you see the year 2014 and in the peak 3 you see the year 2015, but now I would like to know how to do if:
    I want to present it's two years in a single graph.
    Thank you for your help.
    https://ibb.co/mKW36b

    https://ibb.co/hP636b

    https://ibb.co/iZPeew


First--> Again there seem to be inconsistencies in your table values or chart setup and chart sql.

You cannot have total = 32 for "Masculin" over the years 2014+2015, // while total for "Masculin" year 2014 = 37 and total "Masculin" year 2015 = 32 !

The same applies to "Féminin".
Check the manual on how to setup the chart, and how to filter it.

H
htmalbenur author 1/4/2018

ok thanks for your comment this is exactly what i want to correct, the first pic you mention i should have two different pic showing the result on two year mail it only shows one result, now i would like to know how to display the result of both years simultaneously.
Thx

lefty 1/6/2018



ok thanks for your comment this is exactly what i want to correct, the first pic you mention i should have two different pic showing the result on two year mail it only shows one result, now i would like to know how to display the result of both years simultaneously.
Thx


Don't use slider , use date filter for this field and use this year, last year or all years, and months , Which are customizable / See This Link. Click on fields , then click on search and filter button , click the date field and sexe field to filter .

see this link Filter by dates fifth screenshot down. basesd on your first screenshot you only need one chart . Just use the date filters in the link to the date filter . You can also reduce the size of the graphs in visual editor by making the table smaller or larger to your liking by clicking on yellow graph and re-sizing. It will automatically make bars smaller or larger based on

how many columns there are. The more data or more years the smaller the bars will be based on size of table . Hope this helps.

H
htmalbenur author 1/7/2018

to tell you in visual editor, it's really impossible to enlarge and close the graph, and the graph is not displayed, I see nothing as a graph if not the box. now i would like to know how to have graphs like in execl .... thanks

lefty 1/8/2018



to tell you in visual editor, it's really impossible to enlarge and close the graph, and the graph is not displayed, I see nothing as a graph if not the box. now i would like to know how to have graphs like in execl .... thanks


In older versions you can just drag the handles in visual editor , now I see you can't , so Highlight graph , switch to html view and change 1000 1000 to whatever size you like .