Exhibit/BarChart View

From SIMILE Widgets
Revision as of 23:08, 2 November 2015 by Tullyhansen (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To add bar charts to your exhibit, you must include the chart extension (after you include exhibit-api.js):

 <script src="http://api.simile-widgets.org/exhibit/2.2.0/extensions/chart/chart-extension.js"></script>

To include a barchar view, add to your HTML

 <div ex:role="view"
   ex:viewClass="Exhibit.BarChartView"
   ex:itemTypes=".type"
   ex:label="Bar Chart Title"
   ex:x=".aggregation_expression"
   ex:xLabel="X Axe Label"
   ex:y=".aggregation_expression"
   ex:yLabel="Y Axe Label">
 </div>

The aggregation_expression can be any valid expression, e.g. typically value or count(!attribute).

For an example see the Nobelist Exhibit.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox