Skip to content

Commit dbca51c

Browse files
committed
alignAt -> alignTo
1 parent 5bba0d7 commit dbca51c

7 files changed

Lines changed: 15 additions & 15 deletions

File tree

dist/uPlot.cjs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ const xAxisOpts = {
14411441
stroke: hexBlack,
14421442
space: 50,
14431443
gap: 5,
1444-
alignAt: 1,
1444+
alignTo: 1,
14451445
size: 50,
14461446
labelGap: 0,
14471447
labelSize: 30,
@@ -1609,7 +1609,7 @@ const yAxisOpts = {
16091609
stroke: hexBlack,
16101610
space: 30,
16111611
gap: 5,
1612-
alignAt: 1,
1612+
alignTo: 1,
16131613
size: 50,
16141614
labelGap: 0,
16151615
labelSize: 30,
@@ -4605,7 +4605,7 @@ function uPlot(opts, data, then) {
46054605
let border = axis.border;
46064606
let _tickSize = ticks.show ? ticks.size : 0;
46074607
let tickSize = round(_tickSize * pxRatio);
4608-
let axisGap = round((axis.alignAt == 2 ? axis._size - _tickSize - axis.gap : axis.gap) * pxRatio);
4608+
let axisGap = round((axis.alignTo == 2 ? axis._size - _tickSize - axis.gap : axis.gap) * pxRatio);
46094609

46104610
// rotating of labels only supported on bottom x axis
46114611
let angle = axis._rotate * -PI/180;

dist/uPlot.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ declare namespace uPlot {
10141014
Right = 2,
10151015
}
10161016

1017-
export const enum AlignAt {
1017+
export const enum AlignTo {
10181018
/** axis gap is on the inside; text is placed at outer gap boundary */
10191019
Inside = 1,
10201020
/** axis gap is on the outside; text is placed at inner gap boundary */
@@ -1114,7 +1114,7 @@ declare namespace uPlot {
11141114
align?: Axis.Align;
11151115

11161116
/** baseline for text alignment of axis values - 1: inside, 2: outside */
1117-
alignAt?: Axis.AlignAt;
1117+
alignTo?: Axis.AlignTo;
11181118

11191119
/** gridlines to draw from this axis' splits */
11201120
grid?: Axis.Grid;

dist/uPlot.esm.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ const xAxisOpts = {
14391439
stroke: hexBlack,
14401440
space: 50,
14411441
gap: 5,
1442-
alignAt: 1,
1442+
alignTo: 1,
14431443
size: 50,
14441444
labelGap: 0,
14451445
labelSize: 30,
@@ -1607,7 +1607,7 @@ const yAxisOpts = {
16071607
stroke: hexBlack,
16081608
space: 30,
16091609
gap: 5,
1610-
alignAt: 1,
1610+
alignTo: 1,
16111611
size: 50,
16121612
labelGap: 0,
16131613
labelSize: 30,
@@ -4603,7 +4603,7 @@ function uPlot(opts, data, then) {
46034603
let border = axis.border;
46044604
let _tickSize = ticks.show ? ticks.size : 0;
46054605
let tickSize = round(_tickSize * pxRatio);
4606-
let axisGap = round((axis.alignAt == 2 ? axis._size - _tickSize - axis.gap : axis.gap) * pxRatio);
4606+
let axisGap = round((axis.alignTo == 2 ? axis._size - _tickSize - axis.gap : axis.gap) * pxRatio);
46074607

46084608
// rotating of labels only supported on bottom x axis
46094609
let angle = axis._rotate * -PI/180;

dist/uPlot.iife.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ var uPlot = (function () {
14421442
stroke: hexBlack,
14431443
space: 50,
14441444
gap: 5,
1445-
alignAt: 1,
1445+
alignTo: 1,
14461446
size: 50,
14471447
labelGap: 0,
14481448
labelSize: 30,
@@ -1610,7 +1610,7 @@ var uPlot = (function () {
16101610
stroke: hexBlack,
16111611
space: 30,
16121612
gap: 5,
1613-
alignAt: 1,
1613+
alignTo: 1,
16141614
size: 50,
16151615
labelGap: 0,
16161616
labelSize: 30,
@@ -4606,7 +4606,7 @@ var uPlot = (function () {
46064606
let border = axis.border;
46074607
let _tickSize = ticks.show ? ticks.size : 0;
46084608
let tickSize = round(_tickSize * pxRatio);
4609-
let axisGap = round((axis.alignAt == 2 ? axis._size - _tickSize - axis.gap : axis.gap) * pxRatio);
4609+
let axisGap = round((axis.alignTo == 2 ? axis._size - _tickSize - axis.gap : axis.gap) * pxRatio);
46104610

46114611
// rotating of labels only supported on bottom x axis
46124612
let angle = axis._rotate * -PI/180;

dist/uPlot.iife.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/opts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ export const xAxisOpts = {
506506
stroke: hexBlack,
507507
space: 50,
508508
gap: 5,
509-
alignAt: 1,
509+
alignTo: 1,
510510
size: 50,
511511
labelGap: 0,
512512
labelSize: 30,
@@ -674,7 +674,7 @@ export const yAxisOpts = {
674674
stroke: hexBlack,
675675
space: 30,
676676
gap: 5,
677-
alignAt: 1,
677+
alignTo: 1,
678678
size: 50,
679679
labelGap: 0,
680680
labelSize: 30,

src/uPlot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,7 @@ export default function uPlot(opts, data, then) {
19901990
let border = axis.border;
19911991
let _tickSize = ticks.show ? ticks.size : 0;
19921992
let tickSize = round(_tickSize * pxRatio);
1993-
let axisGap = round((axis.alignAt == 2 ? axis._size - _tickSize - axis.gap : axis.gap) * pxRatio);
1993+
let axisGap = round((axis.alignTo == 2 ? axis._size - _tickSize - axis.gap : axis.gap) * pxRatio);
19941994

19951995
// rotating of labels only supported on bottom x axis
19961996
let angle = axis._rotate * -PI/180;

0 commit comments

Comments
 (0)