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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:57:38+00:00 2026-06-10T17:57:38+00:00

I am using vaadin and for some visual data analysis I’ve added the addon

  • 0

I am using vaadin and for some visual data analysis I’ve added the addon InvientCharts for vaadin (https://vaadin.com/directory#addon/invient-charts).

Is it possible to dynamically change the x- and y-axis Caption of the scattertchart (so after the chart has been created)?

I’m currently having a scatterchart and a button. When the button is clicked, all existing points (Series) shall be removed, the x- and y-axis caption shall change and the new points shall be added on the chart.

That’s the code snippet with which I’m trying it currently:

public void changePoints(String xAxisTitle, String yAxisTitle, List<List<double[]>> xAndYCoordinates) {
        // remove all points from the scatterchart - THIS IS WORKING
        Object[] allSeries = chart.getAllSeries().toArray();
        for(int j = 0; j < allSeries.length; j++){
            Series serie = (Series) allSeries[j];
            chart.removeSeries(serie);
        }

        // update the x- and y-axis - THIS IS NOT WORKING AND WHAT I'M TALKING ABOUT
        chartConfig.getXAxes().clear();
        chartConfig.getYAxes().clear();
        NumberXAxis xAxis = new NumberXAxis();
        xAxis.setTitle(new AxisTitle(xAxisTitle));
        xAxis.setStartOnTick(true);
        xAxis.setEndOnTick(true);
        xAxis.setShowLastLabel(true);
        LinkedHashSet<XAxis> xAxesSet = new LinkedHashSet<InvientChartsConfig.XAxis>();
        xAxesSet.add(xAxis);
        chartConfig.setXAxes(xAxesSet);
        NumberYAxis yAxis = new NumberYAxis();
        yAxis.setTitle(new AxisTitle(yAxisTitle));
        LinkedHashSet<YAxis> yAxesSet = new LinkedHashSet<InvientChartsConfig.YAxis>();
        yAxesSet.add(yAxis);
        chartConfig.setYAxes(yAxesSet);


        // add the new points - THIS IS WORKING AGAIN
        for (int i = 0; i < versionDates.size(); i++) {
            String versionDate = versionDates.get(i);
            List<double[]> versionValues = xAndYCoordinates.get(i);

            ScatterConfig versionScatterConfig = new ScatterConfig();
            XYSeries series = new XYSeries("Version " + (i + 1) + " - "
                    + versionDate, versionScatterConfig);
            series.setSeriesPoints(getPoints(series, versionValues));
            chart.addSeries(series);
        }
    }

As you can see, the removing and adding of points works perfectly fine, which I assume is because I’m working directly on the chart here, while I’m working on the chartConfig when I try to change the axes caption.

Could you please tell or show me how I can change the caption of the x- and y-Axis in an already existing chart (As described above)?

Thanks a lot

  • 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-10T17:57:40+00:00Added an answer on June 10, 2026 at 5:57 pm

    After a lot of research I’ve come to the conclusion that there seems to be currently no way of changing the x- and yAxis caption dnymically, which works.

    I found out that if you refresh the page, e.g. by pressing F5, the axes caption gets changed. I’ve tried implementing a refresher, but somehow the behaviour still didn’t change.

    So it looks like a bug (or software failure) for me.

    My workaround which is doing the same is just removing the whole chart and then adding a completely new one with the new Axis-caption. This works perfectly fast and fine, but is a dirty solution in my eyes, since you have to add more lines of codes than necessary, as well as the logic is now basically more complicated then it should be.

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

Sidebar

Related Questions

I'm using an FormSender addon of Vaadin to send some data to my servlet
Using this tutorial https://vaadin.com/springroo , i was able to get a Spring Roo project
I am using vaadin framework, I can use the com.vaadin.ui.Accordion library for Accordion. By
I'm using the Vaadin framework, my web.xml looks as follows: <servlet> <servlet-name>myservletname</servlet-name> <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class> <init-param>
I am creating a file manager application using vaadin as ui and alfresco as
I am developing a web application in java using the Vaadin framework. I am
I am trying to create a UI for a java web app using Vaadin.
I am having trouble compiling my widgetset using maven and vaadin. when i run
I'm going to develop a web application using SmartGWT. I've heard about Vaadin framework.
I am working with Vaadin and I have some trouble iterating through choices in

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.