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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:05:08+00:00 2026-05-30T15:05:08+00:00

I need to create a dynamic dataseries for flot graph. My x-axis is time

  • 0

I need to create a dynamic dataseries for flot graph. My x-axis is time and y axis is count.

I need to show 5 graphs with different colors. How I will give data series for Flot.

  • 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-30T15:05:10+00:00Added an answer on May 30, 2026 at 3:05 pm

    Here’s an example of 5 graphs with 5 different colors using time as the X axis. Clicking on the links updates the data series and the graphs.

    <script language="javascript" type="text/javascript" src="../jquery.js"></script>
    <script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
    
    <div id="graph_1" style="width:300px;height:100px;"></div>
    <div id="graph_2" style="width:300px;height:100px;"></div>
    <div id="graph_3" style="width:300px;height:100px;"></div>
    <div id="graph_4" style="width:300px;height:100px;"></div>
    <div id="graph_5" style="width:300px;height:100px;"></div>
    
    <script>
    // Initialize the data to be graphed
    var data = new Array();
    data[0] = new Array();
    data[1] = new Array();
    data[2] = new Array();
    data[3] = new Array();
    data[4] = new Array();
    
    var ticks = new Array();
    
    draw_graphs();
    
    // Draw the graphs
    function draw_graphs() {
        $.plot($("#graph_1"), [{data:data[0],color:1}],{ xaxis: { mode: "time" }});
        $.plot($("#graph_2"), [{data:data[1],color:2}],{ xaxis: { mode: "time" }});
        $.plot($("#graph_3"), [{data:data[2],color:3}],{ xaxis: { mode: "time" }});
        $.plot($("#graph_4"), [{data:data[3],color:4}],{ xaxis: { mode: "time" }});
        $.plot($("#graph_5"), [{data:data[4],color:5}],{ xaxis: { mode: "time" }});
    }
    
    // Update the data
    function change_data(n) {
        d = new Date();
        data[n].push([d.getTime(),n]);
        draw_graphs();
    }
    
    </script>
    
    <a href="#" onclick="change_data(0)">Update 1</a><br>
    <a href="#" onclick="change_data(1)">Update 2</a><br>
    <a href="#" onclick="change_data(2)">Update 3</a><br>
    <a href="#" onclick="change_data(3)">Update 4</a><br>
    <a href="#" onclick="change_data(4)">Update 5</a><br>
    

    You can also use the flot example pages on Updating Graphs with AJAX and Time

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

Sidebar

Related Questions

HI all, i need to create an dynamic array, every time i add object,it
I have a need to create a graph, where the scale of the Y-axis
I need to create a dynamic array in Java, but the values type differ
Need to create a custom DNS name server using C which will check against
i want to write head tag. i need create dynamic <head id=htmlHead runat=server> </head>
I need to create dynamic 'Pay Now' buttons on my site, and PayPal says
I have a dynamic application that need to create a window interface with checkbox.
i have create 7 dynamic buttons in a scroll box. Each row need to
I need to create dynamic radio button in my table.I have a table in
I'm working on an ajax google maps script and I need to create dynamic

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.