Welcome to the LimeSurvey Community Forum

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

Public statistics graphs only

  • joost1982
  • joost1982's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 3 weeks ago #117581 by joost1982
Public statistics graphs only was created 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.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 3 weeks ago #117590 by DenisChenu
Replied by DenisChenu on topic Public statistics graphs only
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 service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
8 years 2 months ago #129592 by carlaxel
Replied by carlaxel on topic Public statistics graphs only
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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago - 8 years 2 months ago #129596 by tpartner
Replied by tpartner on topic Public statistics graphs only
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: 8 years 2 months ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose