Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Public statistics graphs only

More
10 years 6 months ago #117581 by joost1982
Is it possible to show only graphs at the public statistics section? I would like the text/tables removed.
The topic has been locked.
More
10 years 6 months ago #117590 by DenisChenu
Surely can be done with template.css.

Using some display:none at good place.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
9 years 8 months ago #129592 by carlaxel
Want to clean up the statistics page, e.g. show only graphs.
Tried editing template.css, but since the graphs are inside the tables, I'm unsure how to use diplay:none.
Could you examplify?

Part of template.css I am looking at:
/* Print answers */
table.printouttable{width:99%}

Using citronade
The topic has been locked.
More
9 years 8 months ago - 9 years 8 months ago #129596 by tpartner
I don't think you can easily do it with pure CSS (there very few classes assigned to the table elements) but adding this to the end of template.js should do the trick:

Code:
$(document).ready(function(){
  if($('#statsContainer').length > 0) {
 
    // Add some classes
    $('.statisticstable thead tr:nth-child(2)').addClass('title-row');
    $('.statisticstable tbody img').closest('tr').addClass('chart-row');
 
    // Remove all but the question titles and charts
    $('.statsSurveyTitle, .statsNumRecords, .statisticssummary').remove();
    $('.statisticstable tr:not(.title-row, .chart-row)').remove();
  }
});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 years 8 months ago by tpartner.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose