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

Y axis label is not showing in crosshair annotation. #1644

Open
supriya-somavnshi opened this issue Oct 29, 2020 · 3 comments
Open

Y axis label is not showing in crosshair annotation. #1644

supriya-somavnshi opened this issue Oct 29, 2020 · 3 comments
Labels

Comments

@supriya-somavnshi
Copy link

I am trying to creating SVG crosshair annotation but it is not showing Y axis annotation label .

Similarly I tried example that are given in Post : Cannot reposition labels with canvas crosshair / line annotation #1628 . This example is also not showing y axis label for crosshair .

Please suggest me . why the Y axis label is not showing ??

annotaion label

Please find my code attached .

Multi_Chart.zip

@artemiusgreat
Copy link

Possible duplicate
#1628

@supriya-somavnshi
Copy link
Author

Here i am using SVG crosshair annotation .

@chrisprice
Copy link
Contributor

I think you'll find the label is there in the DOM, it's just not being rendered because the .plot-area has overflow:hidden. Here's the DOM generated by the example on the website -

<g class="annotation-crosshair" style="pointer-events: none;">
  <g class="multi">
    <g>
      <g class="annotation-line horizontal" transform="translate(10, 597)" style="stroke: rgb(187, 187, 187);">
        <line x2="1668"></line>\
        <g class="left-handle" style="stroke: none;"></g>


        <g class="right-handle" transform="translate(1668, 0)" style="stroke: none;">
          <text text-anchor="start" x="9" y="0" dy="0.32em">0.65</text>
        </g>


      </g>
    </g>
  </g>

  ...

</g>

You have 2 options -

  • Allow overflow on the .plot-area
  • Horizontally offset the .right-handle>text element

In both cases, as you're using SVG these adjustments can be applied using decorate on the crosshair.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants