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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:52:17+00:00 2026-05-27T21:52:17+00:00

On page jqPlot there is an example of dragging data point on jqPlot chart.

  • 0

On page jqPlot there is an example of dragging data point on jqPlot chart.

How can I submit (e.g. with jQuery ajax) to server changed values? Are changed (current) values stored somewhere in jqplot object?

  • 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-27T21:52:17+00:00Added an answer on May 27, 2026 at 9:52 pm

    The hardest thing here is knowing when the user drags a point, not getting the data afterward. I recommend you use a postDrawSeries hook like so:

    $(document).ready(function () {
    
      // set up plot
      $.jqplot.config.enablePlugins = true;
    
      s1 = [['23-May-08',1],['24-May-08',4],['25-May-08',2],['26-May-08', 6]];
    
      plot1 = $.jqplot('chart1',[s1],{
         title: 'Highlighting, Dragging, Cursor and Trend Line',
         axes: {
             xaxis: {
                 renderer: $.jqplot.DateAxisRenderer,
                 tickOptions: {
                     formatString: '%#m/%#d/%y'
                 },
                 numberTicks: 4
             },
             yaxis: {
                 tickOptions: {
                     formatString: '$%.2f'
                 }
             }
         },
         highlighter: {
             sizeAdjust: 10,
             tooltipLocation: 'n',
             tooltipAxes: 'y',
             tooltipFormatString: '<b><i><span style="color:red;">hello</span></i></b> %.2f',
             useAxesFormatters: false
         },
         cursor: {
             show: true
         }
      });
    
      // add our hook, to fire after a series update
      $.jqplot.postDrawSeriesHooks.push(updatedSeries);
    
      function updatedSeries(sctx, options) {
        console.log(plot1.series[0].data); //data for the series is here
      }
    
    });
    

    Output on every drag is (containing the updated data point):

    [
    Array[2]
    , 
    Array[2]
    , 
    Array[2]
    , 
    Array[2]
    ]
    

    Here’s an example. (You’ll have to cache the jqPlot js files in your browser since they do not allow hotlinking.)

    You’ll have to implement some sort of timer to wait for 5 seconds or so before calling your ajax since the postdrawseries hook fires on EVERY drag event. That shouldn’t be too hard though.

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

Sidebar

Related Questions

I have a page that has a jquery chart on it (JQPlot). Unfortunately for
On page 88 of Stephen Toub's book http://www.microsoft.com/download/en/details.aspx?id=19222 There is the code private BlockingCollection<T>
page.getByXPath(//*[@href='http://www.example.com/index.do/abc/1_*'); Do I need to escape any characters? I am trying to get all
Page Main uses setInterval in combination with jQuery.load to load content from Sub page.
Page speed suggests to give image height and width for the images , can
Page: <body> <form id=frmLogin runat=server> <asp:Button ID=btnClick OnClientClick=openConfirmDialog(); OnClick=PopulateLabel runat=server/> <div id=divDialog></div> <asp:Label ID=lblText
page.xml.php will not show any output, in firebug I can see the get response
I have a page where I currently display a large plot (made with jqplot),
I want to build a page with interactively refreshing charts based on the data
Does anyone have any idea why my chart is not being rendered with Jqplot?

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.