GithubHelp home page GithubHelp logo

Comments (7)

mbostock avatar mbostock commented on April 25, 2024 2

When you specify the tick values, you’re specifying the tick values, period. If you want to limit your tick values to the domain, you should filter them first before passing them to the axis.

from d3-axis.

mbostock avatar mbostock commented on April 25, 2024

What did you expect the method or methods to do, and how did the observed behavior differ? Please define precisely how expectations were violated if you’d like me to investigate.

Please also consider asking for help on Stack Overflow. If you have a question about D3’s behavior and want to discuss it with other users, also consider the d3-js Google Group or joining the d3-js Slack.

Thank you! 🤗

from d3-axis.

alexsmartens avatar alexsmartens commented on April 25, 2024

Hi @prrandrade,
I'm having the same problem. Have you found a solution?

from d3-axis.

alexsmartens avatar alexsmartens commented on April 25, 2024

Hi @mbostock,
the problem might be seen in @prrandrade's example as following:

image

when custom tickValues are assigned to X axis and zoom is applied, navigating the chart generates X ticks outside of the axis location. I'd expect these ticks to be invisible (the same behavior as when tickValues are not specified, e.g. Y axis ticks on the above image).

@mbostock, would you please suggest how to overcome this problem?

from d3-axis.

imbdinesh avatar imbdinesh commented on April 25, 2024

@mbostock @alexsmartens Hi Alex,I am facing same issue on zoom, x ticks getting outside.
Can you please share sample how you fixed this?
Thanks in advance!

from d3-axis.

imbdinesh avatar imbdinesh commented on April 25, 2024

My X ticks are [1KM ,2KM,3KM,6KM,9KM,12KM] and when I zoom chart is showing some ticks like 1KM,2KM outside of Y axis left or right .I want to display only ticks within charting area.I am using Linear Scale on X axis

from d3-axis.

imbdinesh avatar imbdinesh commented on April 25, 2024

Never mind, problem solved .Some issue with filtering domain and passing to axis.
Thanks.
@mbostock Thank you for such great Data Visualisation library.

from d3-axis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.