|
@@ -29,8 +29,9 @@
|
|
<% column_types = blazer_column_types(@columns, @rows, @boom) %>
|
|
<% column_types = blazer_column_types(@columns, @rows, @boom) %>
|
|
<% chart_options = {id: chart_id, min: nil} %>
|
|
<% chart_options = {id: chart_id, min: nil} %>
|
|
<% series_library = {} %>
|
|
<% series_library = {} %>
|
|
- <% @columns.select { |k| k.downcase == "target" }.each_with_index do |key, i| %>
|
|
|
|
- <% series_library[i] = {pointStyle: "line", hitRadius: 5, borderColor: "#109618", pointBackgroundColor: "#109618", backgroundColor: "#109618"} %>
|
|
|
|
|
|
+ <% target_index = @columns.index { |k| k.downcase == "target" } %>
|
|
|
|
+ <% if target_index %>
|
|
|
|
+ <% series_library[target_index - 1] = {pointStyle: "line", hitRadius: 5, borderColor: "#109618", pointBackgroundColor: "#109618", backgroundColor: "#109618"} %>
|
|
<% end %>
|
|
<% end %>
|
|
<% if blazer_maps? && @markers.any? %>
|
|
<% if blazer_maps? && @markers.any? %>
|
|
<div id="map" style="height: <%= @only_chart ? 300 : 500 %>px;"></div>
|
|
<div id="map" style="height: <%= @only_chart ? 300 : 500 %>px;"></div>
|