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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:39:40+00:00 2026-06-11T00:39:40+00:00

I am trying to replot my jqplot chart. $(document).ready(function(){ var dataseries = [[[10,20]]]; var

  • 0

I am trying to replot my jqplot chart.

$(document).ready(function(){

var dataseries = [[[10,20]]];

 var plot = $.jqplot('placeholder', dataseries ,
        { title:'<%= @question.text%>',
          axes:{
        yaxis:{min:-100, max:100, tickInterval:10, showTicks:true, label:"<%=@question.ylabel1%>"},
        xaxis:{min:-100, max:100, tickInterval:10, showTicks:true, label: "<%=@question.xlabel1%>"},
        y2axis:{min:-100, max:100, tickInterval:10, showTicks:true, label:"<%=@question.ylabel2%>", show:true},
        x2axis:{min:-100, max:100, tickInterval:10, showTicks:true, label:"<%=@question.xlabel2%>", show:true}},

          seriesDefaults:{showLine:false},
          series:<%=itemNames.html_safe%>,
          highlighter:{
        show:true,
        tooltipContentEditor:tooltipContentEditor}

        });
});

function tooltipContentEditor(str, seriesIndex, pointIndex, plot) {
    return plot.series[seriesIndex]["label"];
}


$("#placeholder").bind("jqplotClick", function(ev, gridpos, datapos, neighbor) {

    var x = Math.round(datapos.xaxis);
        var y = Math.round(datapos.yaxis);
      var item = $('li.item_button_selected').attr('id');
      if (item > 0){
        var requestObj = {
          question_id: "<%=@question.id%>",
          user_id: "1",     
        }
        requestObj["item_id"]=item
        requestObj["x"]=x
        requestObj["y"]=y
            plot.series[0].data = [[50,50]];
            plot.replot();

BLAH BLAH BLAH...

<%=itemNames.html_safe%> typically looks like this: [{label:”Winona Ryder”},{label:”Paris Hilton”},{label:”Margaret Thatcher”},{label:”Snooki”},{label:”Natalie Portman”},]

The chart draws fine when the page loads; when I click on the chart, nothing happens. I know the click is being caught; if I put an alert in there, I see it. Help!

  • 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-11T00:39:41+00:00Added an answer on June 11, 2026 at 12:39 am

    OK, figured it out. I needed to declare the “plot” variable as a global variable outside of $(document).ready(function()… Now it’s working!

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

Sidebar

Related Questions

Trying to reproduce the problem from this question , I've found I can't plot
I am trying to use replot with png terminal in Gnuplot. If I do
Trying to get a wildcard search to pick up on any text in org_name
trying to figure out why this is happening - I have an input text
I am trying to replot the following figure in a more legible way. Observe
Trying to create a simple document that gets the parentNode then applies a background
I am using QWT 6 and I am trying to plot some dots every
Trying to use JSPX and running into a strange problem. Text inside jsp:text is
Trying to pull the text value of the label that is dynamically populated by
I'm trying to plot a time series for the last 2 hours, just a

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.