bring back the stems
This commit is contained in:
parent
a99ee96f5c
commit
a9e43ee7cf
|
@ -95,7 +95,7 @@ const DateDistributionChart: React.FC<DistributionChartProps> = (props) => {
|
|||
name: "default",
|
||||
continuous: [],
|
||||
discrete: [
|
||||
{ dateTime: new Date().getTime() - 1000000, y: 0.3 },
|
||||
{ dateTime: new Date().getTime() - 1000000, y: 0.2 },
|
||||
{ dateTime: new Date().getTime(), y: 0.5 },
|
||||
{ dateTime: new Date().getTime() + 1000000, y: 0.7 },
|
||||
],
|
||||
|
|
|
@ -24,10 +24,33 @@ export const timeXScale: TimeScale = {
|
|||
nice: false,
|
||||
domain: { data: "domain", field: "dateTime" },
|
||||
};
|
||||
export const timeYScale: TimeScale = {
|
||||
|
||||
export const linearYScale: LinearScale = {
|
||||
name: "yscale",
|
||||
type: "time",
|
||||
type: "linear",
|
||||
range: "height",
|
||||
zero: true,
|
||||
domain: { data: "domain", field: "y" },
|
||||
};
|
||||
|
||||
export const logXScale: LogScale = {
|
||||
name: "xscale",
|
||||
type: "log",
|
||||
range: "width",
|
||||
zero: false,
|
||||
base: 10,
|
||||
nice: false,
|
||||
clamp: true,
|
||||
domain: { data: "domain", field: "x" },
|
||||
};
|
||||
|
||||
export const expYScale: PowScale = {
|
||||
name: "yscale",
|
||||
type: "pow",
|
||||
exponent: 0.1,
|
||||
range: "height",
|
||||
zero: true,
|
||||
nice: false,
|
||||
domain: { data: "domain", field: "y" },
|
||||
};
|
||||
|
||||
|
@ -86,7 +109,7 @@ export function buildDateVegaSpec(
|
|||
],
|
||||
scales: [
|
||||
xScale,
|
||||
timeYScale,
|
||||
expY ? expYScale : linearYScale,
|
||||
{
|
||||
name: "color",
|
||||
type: "ordinal",
|
||||
|
|
|
@ -25,6 +25,7 @@ export const linearXScale: LinearScale = {
|
|||
nice: false,
|
||||
domain: { data: "domain", field: "x" },
|
||||
};
|
||||
|
||||
export const linearYScale: LinearScale = {
|
||||
name: "yscale",
|
||||
type: "linear",
|
||||
|
|
Loading…
Reference in New Issue
Block a user