Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1510 from 18F/state-export-fixes
Browse files Browse the repository at this point in the history
removed exports charts for All and Total
  • Loading branch information
gemfarmer authored Jun 21, 2016
2 parents e2ecf9e + 9a19d02 commit c180933
Showing 1 changed file with 35 additions and 31 deletions.
66 changes: 35 additions & 31 deletions _includes/location/section-exports.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,41 @@ <h2>Exports</h2>
{% for commodity in export_commodities %}
{% assign exports = commodity[1] %}
{% assign commodity_slug = commodity[0] | slugify %}
<section id="exports-{{ commodity_slug }}" class="chart-item">

<h3 class="chart-title">{{ commodity[0] }}</h3>

<figure class="chart chart-{{ _metric }}">
<eiti-line-chart
data='{% include location/line-chart-data.json values=exports key="dollars" %}'
data-x-range="{{ year_range }}"
selected="{{ year }}">
</eiti-line-chart>
<figcaption>
<span class="eiti-line-chart-x-value">{{ year }}</span>
<span class="eiti-line-chart-y-value">
${{ exports[year].dollars | intcomma }}
</span>
</figcaption>
</figure>

<h4>
<button is="aria-toggle" aria-controls="exports-detail-{{ commodity_slug }}">
&plus; Details
</button>
</h4>
<div id="exports-detail-{{ commodity_slug }}" aria-hidden="true">
{%
include location/display-exports.html
values=exports
percent=false
%}
</div>
</section><!-- /.chart-item -->

{% if commodity[0] != "Total" and commodity[0] != "All" %}
<section id="exports-{{ commodity_slug }}" class="chart-item">

<h3 class="chart-title">{{ commodity[0] }}</h3>

<figure class="chart chart-{{ _metric }}">
<eiti-line-chart
data='{% include location/line-chart-data.json values=exports key="dollars" %}'
data-x-range="{{ year_range }}"
selected="{{ year }}">
</eiti-line-chart>
<figcaption>
<span class="eiti-line-chart-x-value">{{ year }}</span>
<span class="eiti-line-chart-y-value">
${{ exports[year].dollars | intcomma }}
</span>
</figcaption>
</figure>

<h4>
<button is="aria-toggle" aria-controls="exports-detail-{{ commodity_slug }}">
&plus; Details
</button>
</h4>
<div id="exports-detail-{{ commodity_slug }}" aria-hidden="true">
{%
include location/display-exports.html
values=exports
percent=false
%}
</div>

</section><!-- /.chart-item -->
{% endif %}
{% endfor %}
{% else %}
<p>In {{ year }}, extractive industries products did not rank among the top 25 exports from {{ state_name }}.</p>
Expand Down

0 comments on commit c180933

Please sign in to comment.