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