Skip to content

Commit 2ae283e

Browse files
committed
2 parents fd7602a + 48661f3 commit 2ae283e

File tree

6 files changed

+48
-28
lines changed

6 files changed

+48
-28
lines changed

Diff for: CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.0.31](https://github.com/Akylas/nativescript-chart/compare/v0.0.30...v0.0.31) (2020-09-18)
7+
8+
9+
### Bug Fixes
10+
11+
* HorizontalBarChart X bounds check was incorrect. ([b26e2c7](https://github.com/Akylas/nativescript-chart/commit/b26e2c70f26f8a7e5ed49a7bf6e1462495905997))
12+
13+
14+
### Features
15+
16+
* Proper visualization of negative Y values for bar charts. ([82389a2](https://github.com/Akylas/nativescript-chart/commit/82389a2628da04e9c278c623a6f7002ee4283509))
17+
18+
19+
20+
21+
622
## [0.0.30](https://github.com/nativescript-community/nativescript-chart/compare/v0.0.29...v0.0.30) (2020-09-07)
723

824
**Note:** Version bump only for package @nativescript-community/ui-chart

Diff for: demo_vue/package.json

+9-10
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,21 @@
88
"license": "MIT",
99
"dependencies": {
1010
"@nativescript-community/ui-chart": "../plugin",
11-
"@nativescript/core": "~7.0.0",
12-
"@nativescript/theme": "~2.3.0",
11+
"@nativescript/core": "~7.0.3",
12+
"@nativescript/theme": "~2.3.3",
1313
"nativescript-perms": "^2.0.11",
1414
"nativescript-ui-chart": "8.0.2",
15-
"nativescript-vue": "~2.8.0"
15+
"nativescript-vue": "~2.8.1"
1616
},
1717
"devDependencies": {
18-
"@babel/core": "~7.1.0",
19-
"@babel/preset-env": "~7.1.0",
18+
"@babel/core": "~7.11.6",
19+
"@babel/preset-env": "~7.11.5",
2020
"@nativescript/android": "7.0.0",
2121
"@nativescript/ios": "7.0.0",
22-
"@nativescript/types": "~7.0.0",
23-
"@nativescript/webpack": "~3.0.0",
24-
"babel-loader": "~8.0.0",
25-
"nativescript-vue-template-compiler": "~2.8.0",
26-
"node-sass": "^4.7.1",
22+
"@nativescript/webpack": "~3.0.4",
23+
"babel-loader": "~8.1.0",
24+
"nativescript-vue-template-compiler": "~2.8.1",
25+
"node-sass": "^4.14.1",
2726
"typescript": "^4.0.2",
2827
"vue": "^2.6.12",
2928
"vue-class-component": "^7.2.5",

Diff for: lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"plugin"
44
],
5-
"version": "0.0.30",
5+
"version": "0.0.31",
66
"command": {
77
"publish": {
88
"conventionalCommits": true

Diff for: plugin/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.0.31](https://github.com/Akylas/nativescript-chart/compare/v0.0.30...v0.0.31) (2020-09-18)
7+
8+
**Note:** Version bump only for package @nativescript-community/ui-chart
9+
10+
11+
12+
13+
614
## [0.0.30](https://github.com/nativescript-community/nativescript-chart/compare/v0.0.29...v0.0.30) (2020-09-07)
715

816
**Note:** Version bump only for package @nativescript-community/ui-chart

Diff for: plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript-community/ui-chart",
3-
"version": "0.0.30",
3+
"version": "0.0.31",
44
"sideEffects": false,
55
"description": "Nativescript Chart plugin.",
66
"keywords": [

Diff for: src/charting/utils/Utils.ts

+13-16
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ export namespace Utils {
449449
// }
450450

451451
export function drawImage(canvas: Canvas, icon: ImageSource, x, y) {
452-
const drawOffsetX = x - (icon.width / 2);
453-
const drawOffsetY = y - (icon.height / 2);
452+
const drawOffsetX = x - icon.width / 2;
453+
const drawOffsetY = y - icon.height / 2;
454454
canvas.drawBitmap(global.isAndroid ? icon.android : icon, drawOffsetX, drawOffsetY, null);
455455
}
456456

@@ -496,8 +496,7 @@ export namespace Utils {
496496
c.drawText(text, drawOffsetX, drawOffsetY, paint);
497497

498498
c.restore();
499-
}
500-
else {
499+
} else {
501500
if (anchor.x !== 0 || anchor.y !== 0) {
502501
//drawOffsetX -= mDrawTextRectBuffer.width() * anchor.x;
503502
drawOffsetY -= lineHeight * anchor.y;
@@ -724,14 +723,14 @@ export namespace Utils {
724723
* @param values
725724
* @return
726725
*/
727-
export function calcSum(values: Array<number>) {
726+
export function calcSum(values: number[]) {
728727
let sum = 0;
729728

730729
if (values == null) {
731730
return sum;
732731
}
733732

734-
for (let f of values) {
733+
for (const f of values) {
735734
sum += f;
736735
}
737736

@@ -745,30 +744,28 @@ export namespace Utils {
745744
* @param values
746745
* @return
747746
*/
748-
export function calcPosNegSum(values: Array<number>) {
749-
const sums = {pos: 0, neg: 0};
747+
export function calcPosNegSum(values: number[]) {
748+
const sums = { pos: 0, neg: 0 };
750749
if (values == null) {
751750
return sums;
752751
}
753752

754-
let sumNeg = 0;
755-
let sumPos = 0;
753+
const sumNeg = 0;
754+
const sumPos = 0;
756755

757-
for (let f of values) {
756+
for (const f of values) {
758757
if (f <= 0) {
759758
sums.neg += Math.abs(f);
760-
}
761-
else {
759+
} else {
762760
sums.pos += f;
763761
}
764762
}
765763

766764
return sums;
767765
}
768766

769-
export function calcSumToIndex(index: number, values: Array<number>, desc: boolean) {
770-
if (values == null)
771-
return 0;
767+
export function calcSumToIndex(index: number, values: number[], desc: boolean) {
768+
if (values == null) return 0;
772769

773770
let remainder = 0;
774771
let lastIndex = values.length - 1;

0 commit comments

Comments
 (0)