D3 vertical bar chart type 1A

This page contains a generic as well as a realistic example, plus code, for a vertical bar chart created using D3 and dimple libraries with the specifications as listed below.

Specifications

  • x-axis: nominal variable
  • y-axis: percent variable
  • color-by: none

Generic example

Generic code and data

#HTML

#CSS

#JS

#CSV

title subtitle nominal percent extraNumeric extraString
This is the main title This is the subtitle Apples 0.4 101 AB
This is the main title This is the subtitle Bananas 0.75 75 CD
This is the main title This is the subtitle Carrots 0.5 65 EF
This is the main title This is the subtitle Daikon 0.6 150 GH
This is the main title This is the subtitle Endive 0.25 35 IJ
This is the main title This is the subtitle Fig 0.15 123 KL

Realistic example

Realistic code and data

#HTML

#CSS

#JS

#CSV

title subtitle cancerGroup utilization population includedCancers
Appropriate...Factor Regional...site Breast 0.4 122 Breast
Appropriate...Factor Regional...site Colorectal 0.75 188 Colon & rectal
Appropriate...Factor Regional...site Lung 0.5 134 Lung & bronchus
Appropriate...Factor Regional...site Prostate 0.6 157 Prostate
Appropriate...Factor Regional...site Bladder 0.25 78 Bladder
Appropriate...Factor Regional...site Pancreas 0.15 112 Pancreas

Leave a Reply