Gem Seer Help

B

Bla ...

Hi, I'm using Seer gem to make graphics.
It works fine, but i can't change the content of the tooltip that shows
up when i click on some bar (in this case, I'm using a bar chart)
Here's my code:

View:


<div id="chart"></div>
<% if [email protected]? %>

<% unless @tarA.empty? %>
<%= Seer::visualize(
@tarA,
:as => :column_chart,
:in_element =>'chart',
:series => {:series_label => 'name' , :data_label => 'situation',
:data_method => 'Days', :data_series => @series},
:chart_options => {
:height => 300,
:width => 70 * @tarA.size,
:is_3_d => true,
:legend => 'none',
:colors => "[{color:'#990000', darker:'#660000'}]",
:title => "Late taks",
:title_x => 'Tasks',
:title_y => 'Days'
}
) %>
<% end %>

<% else %>
There are no tasks
<% end %>





Controller:



def something

@tarA = Task.all:)conditions => ["project_id = ? and situation =
?", params[:id], "Late"])

@series = @tarA.map{|w| w.situation}

end




Modelo:



def Days
if self.amount_days.nil?
self.amount_days = self.date_end - Date.current
end
if self.amount_days > 0
(self.amount_days).to_s
else
(-self.amount_days).to_s
end
end

def situation
self.situation
end




In the tooltip, it's what shows up:

* The name of the task (as i choose in :series_label)
* The name of the method (that, in this case, is Days)
* The result of the method (the result of the Days method)

The problem is that I want that other information shows up in the
tooltip, without interfering on the graphic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,813
Members
47,357
Latest member
sitele8746

Latest Threads

Top