Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I set the time zone, the BOTBAR is not displayed #30

Open
4 tasks done
majid1605 opened this issue Dec 14, 2022 · 1 comment
Open
4 tasks done

When I set the time zone, the BOTBAR is not displayed #30

majid1605 opened this issue Dec 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@majid1605
Copy link

Describe the bug

Hello
When I set the time zone, the BOTBAR is not displayed, but the tooltip displays the time correctly
by specifying different time frames, the candles are not displayed correctly and they are disabled with baseIndex of the time frame

Screenshot_20221213_193441

Is there a problem with my data?

Screenshot_20221213_193931

Reproduction

https://stackblitz.com/edit/vitejs-night-vision-vp26bw-4osuji?file=src%2Fcomponents%2FHelloWorld.vue,src%2FApp.vue&terminal=dev

Steps to reproduce

No response

Javascript Framework

vue

Logs

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a NightVision issue and not a framework-specific issue.
  • The provided reproduction is a minimal reproducible example of the bug.
@majid1605
Copy link
Author

majid1605 commented Dec 17, 2022

I rewrote the time with javaScript internal Date, but by specifying the timezone, both the time without timezone and the with timezone are rendered at the same time.

https://stackblitz.com/edit/vitejs-vite-b3gujg?terminal=dev
Screenshot_20221217_120314

I added a function to check the botbar and used it in the gridX function to remove duplicate values. And the chart problem is solved.

//Checking x for duplicate coordinates
  function returnUnique(arrayOfArrays){
    const itemsMap = new Map();

    arrayOfArrays.forEach(item => {
      if(itemsMap.size === 0){
        itemsMap.set(item[0], item)
      }else if(!itemsMap.has(item[0])){
        itemsMap.set(item[0], item)
      }
    });

      return [...new Set(itemsMap.values())];
   }

function gridX() {
    if (!mainGrid) {
      calcPositions();
    ...

    self2.xs= returnUnique( self2.xs);

  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants