Skip to content

Commit

Permalink
Kate / DTRA-383 / Improvement/ On the Chart "price info box", date is…
Browse files Browse the repository at this point in the history
… displayed in mm/dd format (#1446)

* refactor: change time format in crosshair store

* feat: add check for chart type

* chore: remove extra comma

* refactor: apply suggestions

* refactor: revert changes with moment library
  • Loading branch information
kate-deriv authored Sep 21, 2023
1 parent e8dd57e commit b58e5cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/store/CrosshairStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class CrosshairStore {
dupMap.Open = dupMap.High = dupMap.Low = 1;
}
}
if (this.showSeries) {
if (this.showSeries && !this.showOhl) {
const renderers = stx.chart.seriesRenderers;
for (const renderer in renderers) {
const rendererToDisplay = renderers[renderer];
Expand Down Expand Up @@ -380,7 +380,8 @@ class CrosshairStore {
if (stx.chart.xAxis.noDraw) {
continue;
} else {
fieldValue = floatDate.innerHTML;
const formattedTime = floatDate.innerHTML.replace(/(\d{2})\/(\d{2})/, '$2/$1');
fieldValue = formattedTime;
}
} else {
fieldValue = CIQ.yyyymmdd(dsField);
Expand Down

2 comments on commit b58e5cd

@vercel
Copy link

@vercel vercel bot commented on b58e5cd Sep 21, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

smart-charts – ./

smart-charts-git-master.binary.sx
smart-charts.binary.sx

@vercel
Copy link

@vercel vercel bot commented on b58e5cd Sep 21, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

smart-charts-deriv-app-integration – ./

smart-charts-deriv-app-integration-git-master.binary.sx
smart-charts-deriv-app-integration.binary.sx

Please sign in to comment.