PluginProbe
SQL Chart Builder / 3.0.4
SQL Chart Builder v3.0.4
3.0.5 3.0.4 3.0.3 3.0.2 3.0.1 trunk 1.0.2 1.0.3 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.7.1 2.3.7.2 2.3.8 3.0.0
← All changes | functions.php +3 -4 trunk3.0.4 View file →
@@ -985,12 +985,11 @@
985 985 }
986 986 return $has_point ? $out : false;
987 987 }
988 988
989 -// X scale options for time-axis mode (globals from asset/front.js): gvnSqlChartsTimeTicks replaces the evenly
990 -// spaced ticks Chart.js generates on a linear scale with the actual data dates, gvnSqlChartsTimeTick formats them
989 +// X scale options for time-axis mode; gvnSqlChartsTimeTick (asset/front.js) formats the ticks as dates
991 990 function guaven_sqlcharts_time_axis_scale(){
992 - return "type: 'linear', offset: true, afterBuildTicks: gvnSqlChartsTimeTicks, ticks: {callback: gvnSqlChartsTimeTick, maxRotation: 45, autoSkip: true},";
991 + return "type: 'linear', offset: true, ticks: {callback: gvnSqlChartsTimeTick, maxRotation: 45},";
993 992 }
994 993 // extra entry for the Chart.js "plugins" object in time-axis mode (tooltip title shown as a date)
995 994 function guaven_sqlcharts_time_axis_plugins($time_points){
996 995 return $time_points !== false ? 'tooltip: {callbacks: {title: gvnSqlChartsTimeTooltipTitle}}' : '';
@@ -1028,9 +1027,9 @@
1028 1027 echo wp_kses(guaven_sqlcharts_colorgenerator(count($points), 0, 0.2, guaven_sqlcharts_colors($i, $pid)),[]);
1029 1028 ?>
1030 1029 ],
1031 1030 borderWidth: 1,
1032 - <?php if ($time_points !== false) echo 'barThickness: 24,'; // fixed width: on a time axis Chart.js would otherwise size bars from the closest pair of dates ?>
1031 + <?php if ($time_points !== false) echo 'maxBarThickness: 48,'; ?>
1033 1032 data: [<?php
1034 1033 echo wp_kses(implode(",", $points),[]);
1035 1034 ?>],
1036 1035 },