Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7626929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:23:30+00:00 2026-05-31T05:23:30+00:00

Dygraphs ordinarily automatically picks Y- (and X-) axis labeling points based on the size

  • 0

Dygraphs ordinarily automatically picks Y- (and X-) axis labeling points based on the size of your axes, the size of the labels, etc. In some cases, it picks labeling points that lead to less clarity. For instance, on a chart with Y-axis values from 0 to 10, it labels at 0, 4, and 8 (for a certain size chart, at least); I’d like it to label at 0, 5, and 10. Is there an option or function I can provide to Dygraphs to specify what points I’d like labeled and ticked?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:23:31+00:00Added an answer on May 31, 2026 at 5:23 am

    You can do this by writing your own y-axis ticker function:
    http://dygraphs.com/options.html#ticker

    This is pretty advanced customization, so be wary and read the documentation in dygraph-tickers.js. Here’s some rough code:

    <script type="text/javascript">
      g = new Dygraph(div, data, {
        axes: {
          y: {
            ticker: function(min, max, pixels, opts, dygraph, vals) {
              return [{v:0, label:"0"}, {v:5, label:"5"}, {v:10, label:"10"}];
            }
          }
        }
      });
    </script>
    

    One downside of this approach is that these are the only y-axis tick marks you’ll ever get, even if the user pans/zooms on the y-axis. Depending on your application, that may or may not be OK.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to set the initial visiblity of some dygraphs data series by column
As you probably know, there is ability to enter some specific characters in vim
I'm trying to process and render some graph in DOT format. The dot file
In my app I'm displaying 10 charts (charts are from dygraphs .) to monitor
I'm currently building a SmartGWT-based web application (using the Portlet Layout). So I have
I'm working on an app that can display a graph with some data, one
The Erlang digraphs module surprised me by mutating state. When dealing with other data
I am trying to create a dygraph(using gviz) in a GWT application. The dygraph
I'm looking for preferably javascript (but flash would do too) charting library which would
Is there a character sequence recognized as a newline that's defined by the C

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.