Docs / Concepts / Rendering / Layouts Layout Facets, concatenated views, breakpoint rules, and right-to-left text are keys on the spec. One JSON document draws the whole figure.
Small multiples layout.facet.field splits the rows. These eight cities share one y domain and one legend. With shared scales, the y title and ticks sit on the outer column and the x ticks sit on the bottom row.
Rides by city Eight cities share one rides scale. Madrid peaks in June and Porto peaks in April. Rides by city Lisbon Lisbon. Eight cities share one rides scale. Madrid peaks in June and Porto peaks in April. Lisbon 0 20 40 60 80 100 Rides Porto Porto. Eight cities share one rides scale. Madrid peaks in June and Porto peaks in April. Porto Madrid Madrid. Eight cities share one rides scale. Madrid peaks in June and Porto peaks in April. Madrid Lyon Lyon. Eight cities share one rides scale. Madrid peaks in June and Porto peaks in April. Lyon Milan Milan. Eight cities share one rides scale. Madrid peaks in June and Porto peaks in April. Milan 0 20 40 60 80 100 Jan Feb Mar Apr May Jun Rides Month Oslo Oslo. Eight cities share one rides scale. Madrid peaks in June and Porto peaks in April. Oslo Jan Feb Mar Apr May Jun Month Dublin Dublin. Eight cities share one rides scale. Madrid peaks in June and Porto peaks in April. Dublin Jan Feb Mar Apr May Jun Month Prague Prague. Eight cities share one rides scale. Madrid peaks in June and Porto peaks in April. Prague Jan Feb Mar Apr May Jun Month Rides Bikes Edit Dashboard layout.concat.columns wraps the views. The arrivals line sets span: 2, so it sits above the dock bars and the cargo donut. The title belongs to the outer spec.
Harbor week Arrivals across the week, ships by dock, and cargo share. Harbor week Arrivals Arrivals peak in May. Arrivals 30 40 50 60 70 Jan Feb Mar Apr May Jun Ships Docks North dock handles the most ships. Docks 0 5 10 15 20 North East South West Ships Cargo Grain is the largest cargo share. Cargo Grain: 42 (42%) Oil: 28 (28%) Timber: 18 (18%) Mail: 12 (12%) 100 Total Grain 42% Oil 28% Timber 18% Mail 12% Edit Breakpoints The same facet uses four columns until the width is 560 or below, then two. Each panel stays tall enough for the ticks.
json {
"layout": {
"facet": { "field": "city", "columns": 4, "scales": "shared", "legend": "shared" },
"breakpoints": [{ "maxWidth": 560, "columns": 2 }]
}
}Rides by city, wide The eight cities sit in four columns. Rides by city, wide Lisbon Lisbon. The eight cities sit in four columns. Lisbon 0 20 40 60 80 100 Rides Porto Porto. The eight cities sit in four columns. Porto Madrid Madrid. The eight cities sit in four columns. Madrid Lyon Lyon. The eight cities sit in four columns. Lyon Milan Milan. The eight cities sit in four columns. Milan 0 20 40 60 80 100 Jan Feb Mar Apr May Jun Rides Month Oslo Oslo. The eight cities sit in four columns. Oslo Jan Feb Mar Apr May Jun Month Dublin Dublin. The eight cities sit in four columns. Dublin Jan Feb Mar Apr May Jun Month Prague Prague. The eight cities sit in four columns. Prague Jan Feb Mar Apr May Jun Month Rides Bikes Edit Rides by city, narrow The eight cities sit in two columns. Rides by city, narrow Lisbon Lisbon. The eight cities sit in two columns. Lisbon 0 20 40 60 80 100 Rides Porto Porto. The eight cities sit in two columns. Porto Madrid Madrid. The eight cities sit in two columns. Madrid 0 20 40 60 80 100 Rides Lyon Lyon. The eight cities sit in two columns. Lyon Milan Milan. The eight cities sit in two columns. Milan 0 20 40 60 80 100 Rides Oslo Oslo. The eight cities sit in two columns. Oslo Dublin Dublin. The eight cities sit in two columns. Dublin 0 20 40 60 80 100 Jan Feb Mar Apr May Jun Rides Month Prague Prague. The eight cities sit in two columns. Prague Jan Feb Mar Apr May Jun Month Rides Bikes Edit Right to left layout.direction is rtl. The first city sits on the right, every bar is drawn, and the y axis follows it. The line below uses Hebrew month labels.
المبيعات حسب المدينة الرياض هي الأعلى، ثم جدة والمدينة والدمام ومكة والدوحة. المبيعات حسب المدينة 0 50 100 150 200 الدوحة المدينة مكة الدمام جدة الرياض المبيعات المدينة
Edit נוסעים בתל אביב יוני הוא החודש העמוס ביותר. נוסעים בתל אביב 30 40 50 60 70 80 יוני מאי אפר מרץ פבר ינו אלפים חודש Edit Previous Interaction Next Large data