1059710597 });
1059810598 return w.globals.invalidLogScale ? series : w.globals.seriesLog;
1059910599 }
10600+ }, {
10601+ key: "getLogValAtSeriesIndex",
10602+ value: function getLogValAtSeriesIndex(val, seriesIndex) {
10603+ if (val === null) return null;
10604+ var w = this.w;
10605+ var yAxisIndex = w.globals.seriesYAxisReverseMap[seriesIndex];
10606+ if (w.config.yaxis[yAxisIndex] && w.config.yaxis[yAxisIndex].logarithmic) {
10607+ return this.getLogVal(w.config.yaxis[yAxisIndex].logBase, val, seriesIndex);
10608+ }
10609+ return val;
10610+ }
1060010611 }, {
1060110612 key: "getBaseLog",
1060210613 value: function getBaseLog(base, value) {
@@ -19285,17 +19296,13 @@
1928519296 maxY = Math.max(maxY, gl.series[i][j]);
1928619297 lowestY = Math.min(lowestY, gl.series[i][j]);
1928719298 }
19288- highestY = maxY;
1928919299 if (gl.seriesGoals[i] && gl.seriesGoals[i][j] && Array.isArray(gl.seriesGoals[i][j])) {
1929019300 gl.seriesGoals[i][j].forEach(function (g) {
19291- if (minY !== Number.MIN_VALUE) {
19292- minY = Math.min(minY, g.value);
19293- lowestY = minY;
19294- }
1929519301 maxY = Math.max(maxY, g.value);
19296- highestY = maxY ;
19302+ lowestY = Math.min(lowestY, g.value) ;
1929719303 });
1929819304 }
19305+ highestY = maxY;
1929919306 if (Utils$1.isFloat(val)) {
1930019307 val = Utils$1.noExponents(val);
1930119308 gl.yValueDecimal = Math.max(gl.yValueDecimal, val.toString().split('.')[1].length);
2439424401 }
2439524402 if (jBar &&
2439624403 // fixes apexcharts.js#2354
24397- isBoxOrCandle && w.globals.comboCharts ) {
24404+ isBoxOrCandle) {
2439824405 bcx = bcx - bw / 2;
2439924406 }
2440024407 } else {
@@ -28147,14 +28154,14 @@
2814728154 var i = indexes.i;
2814828155 var j = indexes.j;
2814928156 var isPositive = true;
28150- var colorPos = w.config.plotOptions.candlestick.colors.upward;
28151- var colorNeg = w.config.plotOptions.candlestick.colors.downward;
28157+ var realIndex = indexes.realIndex;
28158+ var colorPos = w.config.plotOptions.candlestick.colors.upward[realIndex];
28159+ var colorNeg = w.config.plotOptions.candlestick.colors.downward[realIndex];
2815228160 var color = '';
2815328161 if (this.isBoxPlot) {
2815428162 color = [this.boxOptions.colors.lower, this.boxOptions.colors.upper];
2815528163 }
2815628164 var yRatio = this.yRatio[indexes.translationsIndex];
28157- var realIndex = indexes.realIndex;
2815828165 var ohlc = this.getOHLCValue(realIndex, j);
2815928166 var l1 = zeroH;
2816028167 var l2 = zeroH;
@@ -28267,12 +28274,18 @@
2826728274 key: "getOHLCValue",
2826828275 value: function getOHLCValue(i, j) {
2826928276 var w = this.w;
28277+ var coreUtils = new CoreUtils(this.ctx, w);
28278+ var h = coreUtils.getLogValAtSeriesIndex(w.globals.seriesCandleH[i][j], i);
28279+ var o = coreUtils.getLogValAtSeriesIndex(w.globals.seriesCandleO[i][j], i);
28280+ var m = coreUtils.getLogValAtSeriesIndex(w.globals.seriesCandleM[i][j], i);
28281+ var c = coreUtils.getLogValAtSeriesIndex(w.globals.seriesCandleC[i][j], i);
28282+ var l = coreUtils.getLogValAtSeriesIndex(w.globals.seriesCandleL[i][j], i);
2827028283 return {
28271- o: this.isBoxPlot ? w.globals.seriesCandleH[i][j] : w.globals.seriesCandleO[i][j] ,
28272- h: this.isBoxPlot ? w.globals.seriesCandleO[i][j] : w.globals.seriesCandleH[i][j] ,
28273- m: w.globals.seriesCandleM[i][j] ,
28274- l: this.isBoxPlot ? w.globals.seriesCandleC[i][j] : w.globals.seriesCandleL[i][j] ,
28275- c: this.isBoxPlot ? w.globals.seriesCandleL[i][j] : w.globals.seriesCandleC[i][j]
28284+ o: this.isBoxPlot ? h : o ,
28285+ h: this.isBoxPlot ? o : h ,
28286+ m: m ,
28287+ l: this.isBoxPlot ? c : l ,
28288+ c: this.isBoxPlot ? l : c
2827628289 };
2827728290 }
2827828291 }]);
@@ -34566,13 +34579,13 @@
3456634579
3456734580 /*!
3456834581 * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected
34569- * @version 2.0.4
34582+ * @version 2.0.2
3457034583 * https://github.com/svgdotjs/svg.resize.js
3457134584 *
3457234585 * @copyright [object Object]
3457334586 * @license MIT
3457434587 *
34575- * BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time)
34588+ * BUILT: Mon Jul 01 2024 15:05:58 GMT+0200 (Central European Summer Time)
3457634589 */
3457734590 /*!
3457834591 * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
3484934862 this.lastCoordinates = null;
3485034863 this.eventType = "";
3485134864 this.lastEvent = null;
34865+ this.angle = 0;
3485234866 this.handleResize = this.handleResize.bind(this);
3485334867 this.resize = this.resize.bind(this);
3485434868 this.endResize = this.endResize.bind(this);
3491834932 const endPoint = this.snapToGrid(this.el.point(getCoordsFromEvent(e)));
3491934933 let dx = endPoint.x - this.startPoint.x;
3492034934 let dy = endPoint.y - this.startPoint.y;
34935+ console.log("endPoint", endPoint, "startPoint", this.startPoint, dx, dy);
3492134936 if (this.preserveAspectRatio && this.aroundCenter) {
3492234937 dx *= 2;
3492334938 dy *= 2;
3496434979 }).defaultPrevented) {
3496534980 return;
3496634981 }
34967- this.el.size (box.width , box.height).move (box.x , box.y );
34982+ this.el.move (box.x , box.y).size (box.width , box.height );
3496834983 }
3496934984 movePoint(e) {
3497034985 this.lastEvent = e;
@@ -34984,36 +34999,32 @@
3498434999 }
3498535000 rotate(e) {
3498635001 this.lastEvent = e;
34987- const startPoint = this.startPoint;
3498835002 const endPoint = this.el.point(getCoordsFromEvent(e));
34989- const { cx, cy } = this.box;
34990- const dx1 = startPoint.x - cx;
34991- const dy1 = startPoint.y - cy;
35003+ const cx = this.box.cx;
35004+ const cy = this.box.cy;
35005+ const dx1 = this.startPoint.x - cx;
35006+ const dy1 = this.startPoint.y - cy;
3499235007 const dx2 = endPoint.x - cx;
3499335008 const dy2 = endPoint.y - cy;
3499435009 const c = Math.sqrt(dx1 * dx1 + dy1 * dy1) * Math.sqrt(dx2 * dx2 + dy2 * dy2);
3499535010 if (c === 0) {
3499635011 return;
3499735012 }
3499835013 let angle = Math.acos((dx1 * dx2 + dy1 * dy2) / c) / Math.PI * 180;
34999- if (!angle) return;
35000- if (endPoint.x < startPoint.x) {
35014+ if (endPoint.x < this.startPoint.x) {
3500135015 angle = -angle;
3500235016 }
35003- const matrix = new Matrix(this.el);
35004- const { x: ox, y: oy } = new Point(cx, cy).transformO(matrix);
35005- const { rotate } = matrix.decompose();
35006- const resultAngle = this.snapToAngle(rotate + angle) - rotate;
35017+ this.angle = this.snapToAngle(this.angle + angle);
3500735018 if (this.el.dispatch("resize", {
35008- box: this.box ,
35009- angle: resultAngle ,
35019+ box: this.startBox ,
35020+ angle: this.angle ,
3501035021 eventType: this.eventType,
3501135022 event: e,
3501235023 handler: this
3501335024 }).defaultPrevented) {
3501435025 return;
3501535026 }
35016- this.el.transform(matrix.rotateO(resultAngle, ox, oy) );
35027+ this.el.transform({ rotate: this.angle } );
3501735028 }
3501835029 endResize(ev) {
3501935030 if (this.eventType !== "rot" && this.eventType !== "point") {
0 commit comments