Skip to content

Commit

Permalink
Fixed nanodata display (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliza-eliza authored Aug 9, 2024
1 parent a4171f4 commit 210ea58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "LightweightCharts"
uuid = "d6998af1-87ca-4e7f-83d4-864c79a249fa"
version = "2.1.1"
version = "2.1.2"

[deps]
Serde = "db9b398d-9517-45f8-9a95-92af99003e0e"
Expand Down
2 changes: 1 addition & 1 deletion frontend/dist/index_boundle.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions frontend/src/helpers/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ export function fixDateShift(
if (dateShift > 0) {
const trueValue: number = time;
let date: Date = new Date(dateShift + trueValue / dateScale);
const nsRem: number =
(trueValue * (1_000_000 / dateScale)) % 1_000_000_000;
return { date, nsRem };
let nsRem: number = trueValue * (1_000_000 / dateScale);
return { date, nsRem: Number((BigInt(nsRem) + BigInt(dateShift) * 1000_000n) % 1000_000_000n) };
} else {
return { date: new Date(time), nsRem: (time % 1000) * 1_000_000 };
}
Expand Down

2 comments on commit 210ea58

@gryumov
Copy link
Member

@gryumov gryumov commented on 210ea58 Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

Release notes:

  • Fixed nanodata display

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/112734

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.1.2 -m "<description of version>" 210ea584de421efc6249b78f05075465fe7131b7
git push origin v2.1.2

Please sign in to comment.