Published
Edited
Apr 28, 2019
Fork of Radar chart
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
radarLine = d3.lineRadial()
.curve(d3[curveSelect])
.radius(d => rScale(d))
.angle((d, i) => i * angleSlice)
Insert cell
Insert cell
rScale = d3.scaleLinear()
.domain([0, maxValue])
.range([0, radius])
Insert cell
color = d3.scaleOrdinal()
.range(["#EDC951","#CC333F","#00A0B0"])
Insert cell
Insert cell
Insert cell
Insert cell
data = [
[//iPhone
{axis:"Battery",value:0.22},
{axis:"Brand",value:0.28},
{axis:"Contract",value:0.29},
{axis:"Design",value:0.17},
{axis:"Internet",value:0.22},
{axis:"Screen",value:0.02},
{axis:"Price",value:0.21},
{axis:"Smartphone",value:0.50}
],[//Samsung
{axis:"Battery",value:0.27},
{axis:"Brand",value:0.16},
{axis:"Contract",value:0.35},
{axis:"Design",value:0.13},
{axis:"Internet",value:0.20},
{axis:"Screen",value:0.13},
{axis:"Price",value:0.35},
{axis:"Smartphone",value:0.38}
],[//Nokia Smartphone
{axis:"Battery",value:0.26},
{axis:"Brand",value:0.10},
{axis:"Contract",value:0.30},
{axis:"Design",value:0.14},
{axis:"Internet",value:0.22},
{axis:"Screen",value:0.04},
{axis:"Price",value:0.41},
{axis:"Smartphone",value:0.30}
]
];
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more