line, bar, stack, legend, area, background, box, hidden
line
Examples
// Example: chart > plot > series > line
table T = extend.range(5)
T.X = T.N
T.Y = T.N * 2
show chart "My Chart" a1f4 with
haxis by T.X
plot by T.X
same(T.Y) { seriesType: "bar" }
// Example: chart > plot > series > stack
table T = extend.range(5)
T.X = T.N
T.Y = T.N * 2
show chart "My Chart" a1f4 with
haxis by T.X
plot by T.X
same(T.Y) { seriesType: "bar" }
// Example: chart > plot > series > bar
table T = extend.range(5)
T.X = T.N
T.Y = T.N * 2
show chart "My Chart" a1f4 with
haxis by T.X
plot by T.X
same(T.Y) { seriesType: "bar" }
// Example: chart > plot > series > hidden
table T = extend.range(5)
T.X = T.N
T.Y = T.N * 2
show chart "My Chart" a1f4 with
haxis by T.X
plot by T.X
same(T.Y) { seriesType: "bar" }
// Example: chart > plot > series > area
table T = extend.range(5)
T.X = T.N
T.Y = T.N * 2
show chart "My Chart" a1f4 with
haxis by T.X
plot by T.X
same(T.Y) { seriesType: "bar" }
// Example: chart > plot > series > background
table T = extend.range(5)
T.X = T.N
T.Y = T.N * 2
show chart "My Chart" a1f4 with
haxis by T.X
plot by T.X
same(T.Y) { seriesType: "bar" }
// Example: chart > plot > series > legend
table T = extend.range(5)
T.X = T.N
T.Y = T.N * 2
show chart "My Chart" a1f4 with
haxis by T.X
plot by T.X
same(T.Y) { seriesType: "bar" }
// Example: chart > plot > series > box
table T = extend.range(5)
T.X = T.N
T.Y = T.N * 2
show chart "My Chart" a1f4 with
haxis by T.X
plot by T.X
same(T.Y) { seriesType: "bar" }
// Example: linechart > series > line
table T[Date] = with
[| as Date, as Value |]
[| date(2023,01,15), 15 |]
[| date(2023,01,16), 5 |]
[| date(2023,01,17), 12 |]
show linechart "My Line Chart" a1b6 with
same(T.Value) { seriesType: "bar" }
group by T.Date
// Example: linechart > series > stack
table T[Date] = with
[| as Date, as Value |]
[| date(2023,01,15), 15 |]
[| date(2023,01,16), 5 |]
[| date(2023,01,17), 12 |]
show linechart "My Line Chart" a1b6 with
same(T.Value) { seriesType: "bar" }
group by T.Date
// Example: linechart > series > bar
table T[Date] = with
[| as Date, as Value |]
[| date(2023,01,15), 15 |]
[| date(2023,01,16), 5 |]
[| date(2023,01,17), 12 |]
show linechart "My Line Chart" a1b6 with
same(T.Value) { seriesType: "bar" }
group by T.Date
// Example: linechart > series > hidden
table T[Date] = with
[| as Date, as Value |]
[| date(2023,01,15), 15 |]
[| date(2023,01,16), 5 |]
[| date(2023,01,17), 12 |]
show linechart "My Line Chart" a1b6 with
same(T.Value) { seriesType: "bar" }
group by T.Date
// Example: linechart > series > area
table T[Date] = with
[| as Date, as Value |]
[| date(2023,01,15), 15 |]
[| date(2023,01,16), 5 |]
[| date(2023,01,17), 12 |]
show linechart "My Line Chart" a1b6 with
same(T.Value) { seriesType: "bar" }
group by T.Date
// Example: linechart > series > background
table T[Date] = with
[| as Date, as Value |]
[| date(2023,01,15), 15 |]
[| date(2023,01,16), 5 |]
[| date(2023,01,17), 12 |]
show linechart "My Line Chart" a1b6 with
same(T.Value) { seriesType: "bar" }
group by T.Date
// Example: linechart > series > legend
table T[Date] = with
[| as Date, as Value |]
[| date(2023,01,15), 15 |]
[| date(2023,01,16), 5 |]
[| date(2023,01,17), 12 |]
show linechart "My Line Chart" a1b6 with
same(T.Value) { seriesType: "bar" }
group by T.Date
// Example: linechart > series > box
table T[Date] = with
[| as Date, as Value |]
[| date(2023,01,15), 15 |]
[| date(2023,01,16), 5 |]
[| date(2023,01,17), 12 |]
show linechart "My Line Chart" a1b6 with
same(T.Value) { seriesType: "bar" }
group by T.Date
Details
The line value specifies that the series should be displayed as a
line. Each value in the series is a vertex on the line, centered on
the horizontal range corresponding to the date (day, week or month)
for that value.
The stack value specifies that the series should be displayed as a bar.
If multiple series are displayed with stack, their bars are stacked on
top of each other. The horizontal dimensions of the bar are the
horizontal range corresponding to the date for that value.
The legend value specifies that the series should not be displayed
in the chart, only in the legend.
The area value specifies that the series should be displayed as an
area between the series value and the areaTo value (default is 0).
The hidden value specifies that the series should not be displayed
at all, exactly as if it did not exist.