|
@@ -1511,6 +1511,8 @@ function getDatalabelsConfig(isEnabled) {
|
|
|
// // 创建 Chart.js 图表
|
|
|
function createChart(chartType, data, labels) {
|
|
|
|
|
|
+ compare_type_input.style.display = 'block'
|
|
|
+
|
|
|
$('#textToChart').show();
|
|
|
canvasPng.style.maxWidth = '';
|
|
|
canvasPng.style.maxHeight = '';
|
|
@@ -1881,7 +1883,9 @@ const toggleXAxis = document.getElementById('toggleXAxis');
|
|
|
|
|
|
toggleXAxis.addEventListener('change', function () {
|
|
|
// 根据复选框的状态来显示或隐藏 X 轴
|
|
|
- myChart.options.scales.x.ticks.display = this.checked;
|
|
|
+ myChart.options.scales.x.ticks.color = this.checked ? 'rgba(88,75,61,1)' : 'rgba(88,75,61,0)';
|
|
|
+ myChart.options.scales.x.ticks.textStrokeColor = this.checked ? 'rgba(255, 255, 255, 1)' : 'rgba(255, 255, 255, 0)';
|
|
|
+
|
|
|
|
|
|
// 更新图表
|
|
|
myChart.update();
|