Хочу поменять маркеры легенды в закрашенные кружки
щас так
надо так
исходники
const ctx_<?php echo $ch; ?> = document.getElementsByClassName('page_chart_<?php echo $ch; ?>');
new Chart(ctx_<?php echo $ch; ?>, {
type: 'line',
data: {<?php if( have_rows('page_how_tit_left_ch_bottom') ): ?>labels: [<?php while( have_rows('page_how_tit_left_ch_bottom') ) : the_row(); ?>'<?php the_sub_field("txt"); ?>',<?php endwhile; ?>],<?php endif; ?>
datasets: [{
label: '<?php the_field('page_how_tit_left_ch_top'); ?>',
<?php if( have_rows('page_how_tit_left_ch_center') ): ?>data: [<?php while( have_rows('page_how_tit_left_ch_center') ) : the_row(); ?>'<?php the_sub_field("txt"); ?>',<?php endwhile; ?>],<?php endif; ?>
borderWidth:4,
fill: true,
borderColor: '#15CF74',
backgroundColor: 'transparent',
tension: 0.5
}, <?php if(get_field('page_how_tit_left_ch_top2')) { ?>{
type: 'line',
label: '<?php the_field('page_how_tit_left_ch_top2'); ?>',
<?php if( have_rows('page_how_tit_left_ch_center2') ): ?>data: [<?php while( have_rows('page_how_tit_left_ch_center2') ) : the_row(); ?>'<?php the_sub_field("txt"); ?>',<?php endwhile; ?>],<?php endif; ?>
borderWidth:4,
fill: true,
borderColor: '#F66C6A',
backgroundColor: 'transparent',
tension: 0.5
}<?php } ?>]
},
options: {
responsive: true,
scales: {
y: {
beginAtZero: true
},
}
},
});
const ctx_2<?php echo $ch; ?> = document.getElementsByClassName('page_chart_2<?php echo $ch; ?>');
new Chart(ctx_2<?php echo $ch; ?>, {
type: 'line',
data: {<?php if( have_rows('page_how_tit_left_ch_bottom') ): ?>labels: [<?php while( have_rows('page_how_tit_left_ch_bottom') ) : the_row(); ?>'<?php the_sub_field("txt"); ?>',<?php endwhile; ?>],<?php endif; ?>
datasets: [{
label: '<?php the_field('page_how_tit_left_ch_top'); ?>',
<?php if( have_rows('page_how_tit_left_ch_center') ): ?>data: [<?php while( have_rows('page_how_tit_left_ch_center') ) : the_row(); ?>'<?php the_sub_field("txt"); ?>',<?php endwhile; ?>],<?php endif; ?>
borderWidth:4,
fill: true,
borderColor: '#f7b432',
backgroundColor: 'transparent',
tension: 0.5
}, <?php if(get_field('page_how_tit_left_ch_top2')) { ?>{
type: 'line',
label: '<?php the_field('page_how_tit_left_ch_top2'); ?>',
<?php if( have_rows('page_how_tit_left_ch_center2') ): ?>data: [<?php while( have_rows('page_how_tit_left_ch_center2') ) : the_row(); ?>'<?php the_sub_field("txt"); ?>',<?php endwhile; ?>],<?php endif; ?>
borderWidth:4,
fill: true,
borderColor: '#4cb944',
backgroundColor: 'transparent',
tension: 0.5
}<?php } ?>]
},
options: {
responsive: true,
scales: {
y: {
beginAtZero: true
},
}
},
});