@@ -229,7 +229,6 @@ const donut = computed(() => {
229229 id: ` donut_${ i} `
230230 }
231231 })
232- // .sort((a, b) => b.value - a.value)
233232 .map ((ds , i ) => {
234233 return {
235234 ... ds,
@@ -280,7 +279,6 @@ const donut = computed(() => {
280279
281280 tooltipContent .value = ` <div>${ html} </div>` ;
282281 }
283-
284282 isTooltip .value = true ;
285283 }
286284
@@ -382,11 +380,11 @@ const line = computed(() => {
382380 maxSeries: Math .max (... ds .map (d => d .values .length ))
383381 }
384382
383+ const scale = calculateNiceScale (extremes .min < 0 ? extremes .min : 0 , extremes .max , quickConfig .value .xyScaleSegments )
385384 const absoluteMin = extremes .min < 0 ? Math .abs (extremes .min ) : 0 ;
386- const absoluteZero = drawingArea .bottom - (absoluteMin / (extremes .max + absoluteMin) * drawingArea .height )
385+ const absoluteZero = drawingArea .bottom - (absoluteMin / (scale .max + absoluteMin) * drawingArea .height )
387386 const slotSize = drawingArea .width / extremes .maxSeries ;
388387
389- const scale = calculateNiceScale (extremes .min < 0 ? extremes .min : 0 , extremes .max , quickConfig .value .xyScaleSegments )
390388
391389 const yLabels = scale .ticks .map (t => {
392390 return {
@@ -402,7 +400,7 @@ const line = computed(() => {
402400 coordinates: d .values .map ((v ,j ) => {
403401 return {
404402 x: drawingArea .left + (slotSize * (j + 1 )) - (slotSize / 2 ),
405- y: drawingArea .bottom - (((v + absoluteMin) / (extremes .max + absoluteMin)) * drawingArea .height ),
403+ y: drawingArea .bottom - (((v + absoluteMin) / (scale .max + absoluteMin)) * drawingArea .height ),
406404 value: v
407405 }
408406 })
@@ -537,11 +535,11 @@ const bar = computed(() => {
537535 maxSeries: Math .max (... ds .filter (d => ! segregated .value .includes (d .id )).map (d => d .values .length ))
538536 }
539537
538+ const scale = calculateNiceScale (extremes .min < 0 ? extremes .min : 0 , extremes .max , quickConfig .value .xyScaleSegments )
540539 const absoluteMin = extremes .min < 0 ? Math .abs (extremes .min ) : 0 ;
541- const absoluteZero = drawingArea .bottom - (absoluteMin / (extremes .max + absoluteMin) * drawingArea .height )
540+ const absoluteZero = drawingArea .bottom - (absoluteMin / (scale .max + absoluteMin) * drawingArea .height )
542541 const slotSize = drawingArea .width / extremes .maxSeries ;
543542
544- const scale = calculateNiceScale (extremes .min < 0 ? extremes .min : 0 , extremes .max , quickConfig .value .xyScaleSegments )
545543
546544 const yLabels = scale .ticks .map (t => {
547545 return {
0 commit comments