Stacked Bar Chart

0 22.2K 44.3K 66.5K 88.7K 110.9K 133.0K 155.2K BRB BLR BEL BLZ BEN BMU BTN unnamed unnamed unnamed

SQL source code for this example:

IMPORT TABLE gdp_per_capita
   FROM 'csv:examples/data/gdp_per_capita.csv?headers=true';

DRAW BARCHART WITH
  ORIENTATION HORIZONTAL
  STACKED
  AXIS LEFT
  AXIS BOTTOM
  LEGEND BOTTOM RIGHT INSIDE;

SELECT year AS series, isocode AS x, gdp AS y
    FROM gdp_per_capita
    WHERE year = "2010" OR year = '2009' or year = '2008'
    LIMIT 20 OFFSET 40;

Run this example:

$ fnordmetric-cli --format=svg examples/barcharts/stacked_bars.sql