@@ -689,7 +689,7 @@ app.component('DataTable', {
689
689
} )
690
690
691
691
// Options for our hdr-histogram-style line chart, factored out for re-use:
692
- const makeLatencyLineChartOptions = ( otherPlugins ) => {
692
+ const makeLatencyLineChartOptions = ( otherPlugins , enable_crosshair_zoom = true ) => {
693
693
return {
694
694
tooltips : {
695
695
mode : 'interpolate' ,
@@ -715,7 +715,7 @@ const makeLatencyLineChartOptions = (otherPlugins) => {
715
715
enabled : true ,
716
716
} ,
717
717
zoom : {
718
- enabled : true , // enable zooming
718
+ enabled : enable_crosshair_zoom , // enable zooming
719
719
zoomboxBackgroundColor : 'rgba(66,133,244,0.2)' , // background color of zoom box
720
720
zoomboxBorderColor : '#48F' , // border color of zoom box
721
721
zoomButtonText : 'Reset Zoom' , // reset zoom button text
@@ -770,7 +770,7 @@ const makeLatencyLineChartOptions = (otherPlugins) => {
770
770
fontSize : 12 ,
771
771
fontStyle : 'bold' ,
772
772
callback : ( value , index , allValues ) => {
773
- return value
773
+ return value . toFixed ( 1 )
774
774
} ,
775
775
} ,
776
776
} ,
@@ -832,16 +832,17 @@ app.component('MultiLatencyLineChart', {
832
832
style="
833
833
position: relative;
834
834
width: 800px;
835
- height: 500px;
836
835
padding: 50px 20px;
837
836
margin: auto;
838
837
"
839
838
>
840
839
<h1>{{benchName.replace("-k6-custom","").replaceAll("_"," ")}}</h1>
841
840
<hr />
842
- <canvas id="chart-container " ref="chartElem"></canvas>
841
+ <canvas height="250 " ref="chartElem"></canvas>
843
842
</div>
844
843
` ,
844
+ // ^^^ NOTE: before changing height styling above, make sure it looks good
845
+ // with a chart of at least 50 runs
845
846
setup ( props ) {
846
847
const chartElem = ref ( null )
847
848
onMounted ( ( ) => {
@@ -852,8 +853,8 @@ app.component('MultiLatencyLineChart', {
852
853
label,
853
854
data,
854
855
fill : false ,
855
- borderWidth : 2 ,
856
- pointRadius : 2.5 ,
856
+ borderWidth : 1.5 ,
857
+ pointRadius : 0 , // disable points, which looks cluttered
857
858
// This is a heatmap-style red to blue color scheme which lets us show
858
859
// the results "fading back in time":
859
860
borderColor : redToBlue ( ix , props . benchData . length )
@@ -882,7 +883,8 @@ app.component('MultiLatencyLineChart', {
882
883
labels : hist_labels ,
883
884
datasets : props . benchData . map ( makeDataset ) ,
884
885
} ,
885
- options : makeLatencyLineChartOptions ( zoomOptions ) ,
886
+ // NOTE: this isn't really compatible with crosshair.zoom, so we disable that here:
887
+ options : makeLatencyLineChartOptions ( zoomOptions , false ) ,
886
888
// options: makeLatencyLineChartOptions({colorschemes: { scheme: "brewer.RdYlBu11" }}),
887
889
} )
888
890
} )
0 commit comments