Charts / Bar list

Charts

Bar list

A ranked list of named values: a two-line label, the value, its share of the total and a bar scaled to the largest item.

import { EcoBarList } from "vue-ecosphere"

Top 5 of 9, with share and Show all

The order is the ranking, so it is a real ol. The share column is of the whole month, including the rows not shown.

Revenue by product line, May

Before tax. Shares are of all revenue in the month.

  1. Kitchenware412 products · 18,240 orders$1.84M38.2%
  2. Outdoor furniture96 products · 4,310 orders$1.12M23.2%
  3. Lighting188 products · 9,870 orders$0.74M15.4%
  4. Textiles240 products · 11,020 orders$0.52M10.8%
  5. Garden tools131 products · 5,460 orders$0.31M6.4%
Top 5 of 9 product lines

Each row a link

Link the name only, not the value or the bar.

Sales by region, May

Open a region to see its stores.

  1. North14 stores · 21,960 orders$2.10M43.6%
  2. South11 stores · 15,180 orders$1.31M27.2%
  3. East9 stores · 10,940 orders$0.86M17.8%
  4. West8 stores · 7,710 orders$0.55M11.4%

Two groups with a signed change, no share

Sign every value with a true minus and scale both groups to the largest absolute change.

Largest changes from April

A change is a signal to review, not an error.

Increases

  1. Desk lamps$408K to $590K+$182K
  2. Outdoor rugs$224K to $320K+$96K
  3. Planters$131K to $172K+$41K

Decreases

  1. Pour-over kettles$634K to $510K−$124K

Empty

Say what is missing and for when.

Revenue by sales channel, May

No sales recorded for this store in May.

API

NameTypeDefaultDescription
itemsBarListItem[]—Rows in rank order: name, detail, value, display, share, href.
titlestring—Group title (h4.barlist__t) for two related rankings.
limitnumber—Show the top N and a “Show all” disclosure button.
v-model:expandedbooleanfalseWhether every row is shown.
nounstring"items"Footer caption: “Top 5 of 9 product lines”.
totalnumber—The whole the computed shares are of, including rows not shown.
showSharebooleantrueLeave the share out where it means nothing, as with changes.
scaleMaxnumber—Scale bars to one value across groups (the largest absolute change).
valueFormat(v: number) => string—Formats a value when the item has no display text.
emptyTextstring—barlist__empty: what is missing and for when.