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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:51:58+00:00 2026-05-23T20:51:58+00:00

I am trying to display a Line graph using Seer using Ajax. But all

  • 0

I am trying to display a Line graph using Seer using Ajax.

But all I get is a blank page when I make an ajax request.The same partial works fine when I display is using a render :partial.

Here is the partial _show.html.erb

<div id="chart"></div>
<%= Seer::init_visualization -%>
<%= Seer::visualize(
      sensors, 
      :as => :line_chart,
      :in_element => 'chart',
      :series => {
        :series_label => 'location',
        :data_label => 'id',
        :data_method => 'value',
        :data_series => series
      },
      :chart_options => { 
        :height => 250,
        :width => 500,
        :axis_font_size => 12,
        :colors => ['#0099CC','#990000','#009900'],
        :title => "Rain Data",
        :point_size => 0,
        :line_size => 3,
        :title_y => "Water Level in Feet",
        :smooth_line => "true",
      }
     )
 -%>

This works:

<%= render :partial => 'hcfcdsensors/show', :locals => {:sensors => @sensors , :series => @series} %>

But this Doesn’t:

<%= link_to_remote "show" , :url => show_graph_hcfcd_url(@hcfcdsensors) ,:update => "graphDiv" %>

The complete web page just goes blank.
I have checked the action and availability of required variables in the page and its all there fine.

Any help is welcome.

Thanks
Shaunak

  • 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-23T20:51:58+00:00Added an answer on May 23, 2026 at 8:51 pm

    When making ajax call, You need to draw the chart manually.
    Seer user ” drawChart()” method to draw the chart.

    Below is my ajax response

    <% result_script = Seer::visualize(
          @flight_result_search.sell_classes_for_graph, 
          :as => :area_chart,
          :in_element => 'historical_sellout_chart',
          :series => {
            :series_label => 'name',
            :data_label => 'days_prior',
            :data_method => 'capacity',
            :data_series => [@flight_result_search.current_sell_for_graph,@flight_result_search.historical_sell_for_graph]
          },
          :chart_options => { 
            :height => 400,
            :width => 600,
            :axis_font_size => 11,
            :title => "Historical Sell Out Chart",
            :point_size => 3,
            :color =>['#324F69','#90000B']
          }
         )
    
    %>
    <%= result_script.gsub("</script>",' drawChart();</script>') %>
    

    Don’t forget to eval your ajax response as it is javascript code .
    Also drawChart() should be in same script tag otherwise it doesn’t work.

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

Sidebar

Related Questions

I'm using WTForms and I'm trying to display a SelectField , but I get
I'm trying to display two <div> elements on the same line, but in the
I've been trying to display text using a Quartz context, but no matter what
I'm trying do display a time line in wp7 using amCharts quickCharts . <amq:SerialChart
I'm trying to display text with line breaks in a div using the css
I am trying to display an image and some text on the same line,
I'm trying to display several sliders with labels on the same line, eg: Label1:
I am trying to use the jQuery each function (line 5) to display the
Trying to display current time with PHP (using this ): $date = date('m/d/Y h:i:s
I am trying to display a list of all files found in the selected

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.