[Redizajn 1KA v2] - Testiranje --> Diagnostika - v2
Premaknjen source in funkcija za graf v svoj .js file
This commit is contained in:
parent
bb39db9dbf
commit
ae33fd6ee8
@ -467,8 +467,6 @@ class SurveyDiagnostics
|
||||
echo '</table>';
|
||||
|
||||
// LASTNOSTI ANKETE
|
||||
echo '<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>'; //Chart.js source
|
||||
|
||||
echo '<h2>'.$lang['srv_testiranje_diagnostika_lastnosti'].'</h2>';
|
||||
|
||||
echo '<div class="lastnosti_wrapper">';
|
||||
|
@ -96,6 +96,9 @@ return [
|
||||
dirname(__FILE__).'/../script/DragDrop/dragdropInAdmin.js',
|
||||
dirname(__FILE__).'/../script/custom_column_label_respondent.js',
|
||||
dirname(__FILE__).'/../script/ImageHotSpot/imagemap_question_editor.js',
|
||||
dirname(__FILE__).'/../script/ImageHotSpot/imageHotspot.js',
|
||||
dirname(__FILE__).'/../script/Chartjs/Chart.js', //source za chartjs grafe
|
||||
dirname(__FILE__).'/../script/Chartjs.js',
|
||||
|
||||
dirname(__FILE__).'/../script/jquery/jquery.imagemapster.js',
|
||||
|
||||
|
28
admin/survey/script/Chartjs.js
Normal file
28
admin/survey/script/Chartjs.js
Normal file
@ -0,0 +1,28 @@
|
||||
function diagnosticsChart(place,display) {
|
||||
|
||||
const data = {
|
||||
datasets: [{
|
||||
data: display,
|
||||
backgroundColor: [
|
||||
'rgb(229,229,229)',
|
||||
'rgb(30, 136, 229)',
|
||||
],
|
||||
borderWidth: 0, //spacing between slices
|
||||
}]
|
||||
};
|
||||
|
||||
const config = {
|
||||
type: 'doughnut',
|
||||
data: data,
|
||||
options: {
|
||||
events: [], //no hover labels,animations,...
|
||||
cutout: 32, //slice width
|
||||
}
|
||||
};
|
||||
|
||||
const myChart = new Chart(
|
||||
document.getElementById(place),
|
||||
config
|
||||
);
|
||||
|
||||
}
|
13
admin/survey/script/Chartjs/chart.js
Normal file
13
admin/survey/script/Chartjs/chart.js
Normal file
File diff suppressed because one or more lines are too long
@ -5639,32 +5639,3 @@ function oneClickArchive(){
|
||||
$('#general_popup').html('').fadeIn('slow');
|
||||
$("#general_popup").load('ajax.php?a=oneClickArchive', {anketa: srv_meta_anketa_id});
|
||||
}
|
||||
|
||||
function diagnosticsChart(place,display) {
|
||||
|
||||
const data = {
|
||||
datasets: [{
|
||||
data: display,
|
||||
backgroundColor: [
|
||||
'rgb(229,229,229)',
|
||||
'rgb(30, 136, 229)',
|
||||
],
|
||||
borderWidth: 0, //spacing between slices
|
||||
}]
|
||||
};
|
||||
|
||||
const config = {
|
||||
type: 'doughnut',
|
||||
data: data,
|
||||
options: {
|
||||
events: [], //no hover labels,animations,...
|
||||
cutout: 32, //slice width
|
||||
}
|
||||
};
|
||||
|
||||
const myChart = new Chart(
|
||||
document.getElementById(place),
|
||||
config
|
||||
);
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user