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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:57:49+00:00 2026-05-23T09:57:49+00:00

I want to create a line chart. Currently my graph look like this The

  • 0

I want to create a line chart. Currently my graph look like this

enter image description here

The data is live so the chart should start at 9 AM and increase toward x-axis upto 4 PM

when a user generate chart at 12 PM.
My expected result is (Note: Data is only available upto 12 PM.)

enter image description here

I could not find a way to generate above partial chart. Any idea?

  • 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-23T09:57:49+00:00Added an answer on May 23, 2026 at 9:57 am

    I hope I have understood this correctly. The code in comments is the remainder of the data (from 12pm to 4pm). Without this data the graph will show a partial graph as you require.

    <html>
      <head>
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
        <script type="text/javascript">
          google.load("visualization", "1", {packages:["corechart"]});
          google.setOnLoadCallback(drawChart);
          function drawChart() {
            var data = new google.visualization.DataTable();
            data.addColumn('string');
            data.addColumn('number');
            data.addRows(8);    
            data.setValue(0, 0, '9AM');
            data.setValue(2, 0, '11AM');
            data.setValue(4, 0, '1PM');
            data.setValue(6, 0, '3PM');
            data.setValue(7, 0, '4PM');
    
            data.setValue(0, 1, 5480); // 9AM
            data.setValue(1, 1, 5475); // 10AM
            data.setValue(2, 1, 5490); // 11AM
            data.setValue(3, 1, 5490); // 12PM
            /*
            data.setValue(4, 1, 5500); // 1PM
            data.setValue(5, 1, 5490); // 2PM
            data.setValue(6, 1, 5530); // 3PM
            data.setValue(7, 1, 5560); // 4PM
            */
    
            var chart = 
               new google.visualization.AreaChart(document.getElementById('chart_div'));
               chart.draw(data, {width: 500, height: 240,
                              vAxis: {minValue: 5460, maxValue: 5560},
                              colors: ['#76A4FB'],
                              legend: 'none'
                             });
               }
        </script>
      </head>
      <body>
        <div id="chart_div"></div>
      </body>
    </html>
    

    I hope this helps.

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

Sidebar

Related Questions

I want to create a vertical line shadow over the whole page like this:
I want to create something like this, where each line is surrounded by the
i want to create one app which draw different charts like pie chart, line
I want to create a Line Chart using data received by Google Analytics API.
I want to create a chart with Microsoft's Chart Controls, which looks like this
I want to create a line chart using 2 set of values.First value (i.e
I want to create a struct from data harvested by line from a file.
I need some help. I want to create a dynamic line chart using Google's
I am using Extjs 4 to create a line chart. Now I want to
I want to create a jqPlot line chart which has the ability to change

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.