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 8724621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:52:08+00:00 2026-06-13T07:52:08+00:00

Good day, i have a slight issue. i have created my own Labels on

  • 0

Good day, i have a slight issue. i have created my own Labels on the Y-Axis with the following code below, but they are so clustered together, How can i space them out?.

Here is my code:

 renderer.setYLabels(0); 

//value_value is an array which would use as the labels for the y axis

    int value_size = value_value.length;
        int m = 0;
        //int add =  value_size/10;
        int add =  largest_size/10;   // largest_size is the biggest value in the array value_value


        for(int i=0; i< 10; i++){

            if(m > value_value.length){
                 break;
             }
            renderer.addYTextLabel((double)i, value_value[m].toString(), 1);
            m+=add;
        }

P.S: from the api docs, there is a 3rd parameter “int scale” which i thought would help me space out the margins but i never seem to use it correctly. if i put any value there, i get a NullPointerException. What does it really do and how to use it?

Any help will be highly appreciated. Thank you.

My Graph:

enter image description here

  • 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-06-13T07:52:09+00:00Added an answer on June 13, 2026 at 7:52 am

    Adding custom labels can be tricky because you always have to make sure you are not overlapping them. You should add only as many as needed to avoid overlapping. You can also listen for pan and zoom events and update the custom labels accordingly.

    The scale parameter is useful when you have multiple Y axis scales. If you don’t have then you don’t need to use the parameter.

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

Sidebar

Related Questions

Good day! i have a code below: def initial(*args): for arg in args: with
Good day to all. I have a problem with the following code: textBox.addEventListener(KeyboardEvent.KEY_DOWN,handler); function
Good day, i have a slight issue with relative layouts and i don't know
Good day, I have created an object that will manage data access. My app
Good day, If I have for example the documents which have the following fields
Good day all I have the following question: I would like to use Chart
Good day to all. I have the following setup: A page with html, js,
Good day everyone. I have an audio class, that plays a .wav file. But
Good Day, I have created an asp.net web service on my local machine, and
Good day, i have following setup for my little service: -module(mrtask_net). -export([start/0, stop/0, listen/1]).

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.