Skip to content

Commit

Permalink
Nothing changed, but try to rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Jan 7, 2025
1 parent 396e079 commit dd519e1
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ You can debug view charts locally with:
-->

## Changelog
### 2.0.0 (2025-01-05)
### **WORK IN PROGRESS**

- (@GermanBluefox) Project was completely rewritten with TypeScript
- (@GermanBluefox) Better mobile layouts added
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions admin/chart/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,13 @@
};
script.src =
parseInt(window.location.port) >= 3000 && parseInt(window.location.port) <= 3020
? window.location.protocol +
'//' +
(query.host || window.location.hostname) +
':' +
(query.port || 8081) +
'/lib/js/socket.io.js'
? `${window.location.protocol}//${query.host || window.location.hostname}:${query.port || 8081}/lib/js/socket.io.js`
: '../../lib/js/socket.io.js';

document.head.appendChild(script);
</script>
<title>Echarts [ioBroker]</title>
<script type="module" crossorigin src="./assets/index-CEGXPVnF.js"></script>
<script type="module" crossorigin src="./assets/index-C-7EcNoE.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-VI9R7d-i.css">
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion admin/tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
document.head.appendChild(script);
</script>
<title>Echarts [ioBroker]</title>
<script type="module" crossorigin src="./assets/index-B3QyvjYD.js"></script>
<script type="module" crossorigin src="./assets/index-BM_eVAc7.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-D5BB0j0i.css">
</head>
<body>
Expand Down
7 changes: 5 additions & 2 deletions build-backend/lib/ChartModel.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build-backend/lib/ChartModel.js.map

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions src/lib/ChartModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ function normalizeConfig(config: ChartConfigOld): ChartConfig {

newConfig.marks = newConfig.marks || [];

if (!newConfig.l.length) {
if (!newConfig.l?.length) {
config.l = config.l || [];
config.l.push({ id: '', unit: '' });
}

Expand Down Expand Up @@ -880,7 +881,11 @@ class ChartModel {
break;
}
}
} else if (typeof this.config.range === 'string' && this.config.range.includes('y') && this.config.l.length > 1) {
} else if (
typeof this.config.range === 'string' &&
this.config.range.includes('y') &&
this.config.l.length > 1
) {
const yearRange = parseInt(this.config.range as string, 10) || 1;
for (let a = 0; a < this.config.l.length; a++) {
if (this.config.l[a].offset) {
Expand Down Expand Up @@ -1873,11 +1878,7 @@ class ChartModel {
changed && this.onUpdateFunc(null, this.actualValues);
};

static addTime(
time: number | Date,
offset: string | number,
isOffsetInMinutes?: boolean,
): number {
static addTime(time: number | Date, offset: string | number, isOffsetInMinutes?: boolean): number {
const date: Date = new Date(time);

if (typeof offset === 'string') {
Expand All @@ -1893,7 +1894,7 @@ class ChartModel {
time = date.getTime();
if (isOffsetInMinutes) {
time -= (parseInt(offset, 10) || 0) * 60000;
}else {
} else {
time -= (parseInt(offset, 10) || 0) * 1000;
}
}
Expand Down
4 changes: 2 additions & 2 deletions www/assets/index-CEGXPVnF.js → www/assets/index-C-7EcNoE.js

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,13 @@
};
script.src =
parseInt(window.location.port) >= 3000 && parseInt(window.location.port) <= 3020
? window.location.protocol +
'//' +
(query.host || window.location.hostname) +
':' +
(query.port || 8081) +
'/lib/js/socket.io.js'
? `${window.location.protocol}//${query.host || window.location.hostname}:${query.port || 8081}/lib/js/socket.io.js`
: '../../lib/js/socket.io.js';

document.head.appendChild(script);
</script>
<title>Echarts [ioBroker]</title>
<script type="module" crossorigin src="./assets/index-CEGXPVnF.js"></script>
<script type="module" crossorigin src="./assets/index-C-7EcNoE.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-VI9R7d-i.css">
</head>
<body>
Expand Down

0 comments on commit dd519e1

Please sign in to comment.