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

  • Home
  • SEARCH
  • 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 6984211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:31:12+00:00 2026-05-27T18:31:12+00:00

I am plotting a trend chart in GWT. In concrete, AnnotatedTimeLine. My Java code

  • 0

I am plotting a trend chart in GWT. In concrete, AnnotatedTimeLine. My Java code is:

Runnable onLoadCallback = new Runnable() {
        public void run() {
            ArrayList<AttributeDTO> occAttrs = new   ArrayList<AttributeDTO>();
            for(AttributeDTO attr : attrs){
                if(attr.getName().toLowerCase().contains("temp")){
                    occAttrs.add(attr);
                }
            }
            DataTable data = DataTable.create();
            data.addColumn(ColumnType.DATE, "Date");
            data.addColumn(ColumnType.NUMBER, "Temperature");
            data.addRows(occAttrs.size());
            RootPanel.get().add(new Label(occAttrs.toString()));
            DateTimeFormat dtf = DateTimeFormat.getFormat("yyyy.MM.dd 'at' hh:mm:ss aaa");
            for(int i = 0; i < occAttrs.size(); i++){
                data.setValue(i, 0, dtf.parse(occAttrs.get(i).getDate()));
                data.setValue(i, 1, Integer.valueOf(occAttrs.get(i).getValue()));
            }

            AnnotatedTimeLine.Options options = AnnotatedTimeLine.Options.create();
            options.setDisplayAnnotations(true);
            options.setDisplayZoomButtons(true);
            options.setScaleType(AnnotatedTimeLine.ScaleType.ALLFIXED);
            options.setDateFormat("yyyy.MM.dd 'at' hh:mm:ss aaa");
            options.setLegendPosition(AnnotatedTimeLine.AnnotatedLegendPosition.SAME_ROW);
            AnnotatedTimeLine atl = new AnnotatedTimeLine(data, options, "600px", "400px");

            vPanel.add(atl);
        }

    };
    VisualizationUtils.loadVisualizationApi(onLoadCallback, AnnotatedTimeLine.PACKAGE);

Well, when I show graph I obtain the following figure:

enter image description here

In x axis I have date without time. I would like to include time. How could I get it?

Thanks in advance!!

King regard and merry christmas!

  • 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-27T18:31:13+00:00Added an answer on May 27, 2026 at 6:31 pm

    Either set the format to MMMM dd, yyyy and try or try without setting any format.

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

Sidebar

Related Questions

I am plotting a financial candlestick chart using this MATLAB function: http://www.mathworks.com/help/toolbox/finance/candlefts.html How do
On a recent Java project, we needed a free Java based real-time data plotting
I am new to plotting graphs in Visual C++. I want to use arrays
I am plotting a confusion matrix with matplotlib with the following code: from numpy
Hi i'm plotting columnseries graph using chart controls by downloading Microsoft wpftoolkit. I can
I am plotting a line chart. (aka Frame chart) My series markers are begin
What are the best graph plotting libraries for Java? (preferably also supporting 3D graphs)
I need help on plotting the bar chart to show daily based statistics like
I am Plotting a pixel on the screen from the following code using Assembly
I'm plotting a large polar graph/pie chart of 40+ bars/rings with ggplot2 (using geom_bar

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.