下面的文件在.html.erb中说它需要旧的。
<%
mash = {
"id" => id, "legends" => legends, "x_units" => x_units, "y_units" => y_units, "data" => data, "alertPoints" => alert_points, "time_mode" => time_mode,
"colors" => colors, "x_label" => x_label, "y_label" => y_label, "tipColors" => tipColors, "dateformat" => @dateformat, "timeformat" => @timeformat,
"chart_url" => chart_url, "x_label_date_format" => x_label_date_format, "turn_series" => turn_series, "y_ticks_array" => y_ticks_array, "y_label_width" => y_label_width,
"series_type" => series_type,"vertical_threshold" => vertical_threshold, "x_label_suffix" => x_label_suffix, "y_tick_on" => y_tick_on, "xmin" => xmin, "xmax" => xmax
}
%>
<script type="javascript">
setInterval( function ()
{
onDataReceived(<%=mash.to_json.html_safe%>);
}, 5000);
</script>