mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-09 01:36:57 +08:00
feat: column, bar and line axis title
This commit is contained in:
@@ -23,6 +23,10 @@ export class Bar extends BaseG2Chart {
|
||||
.data(data)
|
||||
.encode('x', x[0].value)
|
||||
.encode('y', y[0].value)
|
||||
.axis({
|
||||
x: { title: x[0].name },
|
||||
y: { title: y[0].name },
|
||||
})
|
||||
.scale('x', {
|
||||
nice: true,
|
||||
})
|
||||
|
||||
@@ -22,6 +22,10 @@ export class Column extends BaseG2Chart {
|
||||
.data(data)
|
||||
.encode('x', x[0].value)
|
||||
.encode('y', y[0].value)
|
||||
.axis({
|
||||
x: { title: x[0].name },
|
||||
y: { title: y[0].name },
|
||||
})
|
||||
.scale('x', {
|
||||
nice: true,
|
||||
})
|
||||
|
||||
@@ -21,6 +21,10 @@ export class Line extends BaseG2Chart {
|
||||
?.data(data)
|
||||
.encode('x', x[0].value)
|
||||
.encode('y', y[0].value)
|
||||
.axis({
|
||||
x: { title: x[0].name },
|
||||
y: { title: y[0].name },
|
||||
})
|
||||
.scale('x', {
|
||||
nice: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user