pr comment tweaks
This commit is contained in:
parent
87c6ff1c3d
commit
a1db813b8b
|
@ -30,7 +30,7 @@ export type DistributionChartProps = {
|
||||||
plot: Plot;
|
plot: Plot;
|
||||||
width?: number;
|
width?: number;
|
||||||
height: number;
|
height: number;
|
||||||
sample: boolean;
|
sample?: boolean;
|
||||||
xAxis?: "number" | "dateTime";
|
xAxis?: "number" | "dateTime";
|
||||||
} & DistributionPlottingSettings;
|
} & DistributionPlottingSettings;
|
||||||
|
|
||||||
|
@ -57,7 +57,6 @@ export const DistributionChart: React.FC<DistributionChartProps> = (props) => {
|
||||||
actions = false,
|
actions = false,
|
||||||
xAxis = "number",
|
xAxis = "number",
|
||||||
} = props;
|
} = props;
|
||||||
console.log({ plot });
|
|
||||||
const [sized] = useSize((size) => {
|
const [sized] = useSize((size) => {
|
||||||
const shapes = flattenResult(
|
const shapes = flattenResult(
|
||||||
plot.distributions.map((x) =>
|
plot.distributions.map((x) =>
|
||||||
|
@ -93,9 +92,7 @@ export const DistributionChart: React.FC<DistributionChartProps> = (props) => {
|
||||||
|
|
||||||
const domain =
|
const domain =
|
||||||
xAxis === "dateTime"
|
xAxis === "dateTime"
|
||||||
? predomain.map((p) => {
|
? predomain.map((p) => ({ dateTime: p.x, y: p.y }))
|
||||||
return { dateTime: p.x, y: p.y };
|
|
||||||
})
|
|
||||||
: predomain;
|
: predomain;
|
||||||
|
|
||||||
const data =
|
const data =
|
||||||
|
|
|
@ -51,7 +51,7 @@ export interface SquiggleChartProps {
|
||||||
minX?: number;
|
minX?: number;
|
||||||
/** Specify the upper bound of the x scale */
|
/** Specify the upper bound of the x scale */
|
||||||
maxX?: number;
|
maxX?: number;
|
||||||
/** Whether the x-axis should be dates or numbers */
|
// /** Whether the x-axis should be dates or numbers */
|
||||||
xAxis?: "number" | "dateTime";
|
xAxis?: "number" | "dateTime";
|
||||||
/** Whether to show vega actions to the user, so they can copy the chart spec */
|
/** Whether to show vega actions to the user, so they can copy the chart spec */
|
||||||
distributionChartActions?: boolean;
|
distributionChartActions?: boolean;
|
||||||
|
|
|
@ -14,10 +14,8 @@ export type DistributionChartSpecOptions = {
|
||||||
title?: string;
|
title?: string;
|
||||||
/** The formatting of the ticks */
|
/** The formatting of the ticks */
|
||||||
format?: string;
|
format?: string;
|
||||||
|
|
||||||
/** Whether or not to show the band of sample data at the bottom */
|
/** Whether or not to show the band of sample data at the bottom */
|
||||||
sample?: boolean;
|
sample?: boolean;
|
||||||
|
|
||||||
/** Whether the x-axis should be dates or numbers */
|
/** Whether the x-axis should be dates or numbers */
|
||||||
xAxis?: "number" | "dateTime";
|
xAxis?: "number" | "dateTime";
|
||||||
};
|
};
|
||||||
|
|
|
@ -88,6 +88,7 @@ could be continuous, discrete or mixed.
|
||||||
code: "mx(10^12, 10^12 + 10^11, 10^12 + 2 * 10^11)",
|
code: "mx(10^12, 10^12 + 10^11, 10^12 + 2 * 10^11)",
|
||||||
width,
|
width,
|
||||||
xAxis: "dateTime",
|
xAxis: "dateTime",
|
||||||
|
width,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{Template.bind({})}
|
{Template.bind({})}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user