gradio-pr-bot commited on
Commit
6a12ae7
·
verified ·
1 Parent(s): 46a1480

Upload folder using huggingface_hub

Browse files
6.18.0/nativeplot/Index.svelte CHANGED
@@ -656,13 +656,16 @@
656
  color: gradio.props.color
657
  ? {
658
  field: escape_field_name(gradio.props.color),
659
- legend: {
660
- orient: "bottom",
661
- title: gradio.props.color_title,
662
- values: gradio.props.colors_in_legend?.length
663
- ? [...gradio.props.colors_in_legend]
664
- : undefined
665
- },
 
 
 
666
  scale:
667
  gradio.props.value!.datatypes[gradio.props.color] ===
668
  "nominal"
 
656
  color: gradio.props.color
657
  ? {
658
  field: escape_field_name(gradio.props.color),
659
+ legend:
660
+ gradio.props.colors_in_legend?.length === 0
661
+ ? null
662
+ : {
663
+ orient: "bottom",
664
+ title: gradio.props.color_title,
665
+ values: gradio.props.colors_in_legend
666
+ ? [...gradio.props.colors_in_legend]
667
+ : undefined
668
+ },
669
  scale:
670
  gradio.props.value!.datatypes[gradio.props.color] ===
671
  "nominal"
6.18.0/nativeplot/types.ts CHANGED
@@ -3,7 +3,7 @@ import type { LoadingStatus } from "@gradio/statustracker";
3
 
4
  export interface PlotData {
5
  columns: string[];
6
- data: [string | number][];
7
  datatypes: Record<string, "quantitative" | "temporal" | "nominal">;
8
  mark: "line" | "point" | "bar";
9
  }
 
3
 
4
  export interface PlotData {
5
  columns: string[];
6
+ data: (string | number)[][];
7
  datatypes: Record<string, "quantitative" | "temporal" | "nominal">;
8
  mark: "line" | "point" | "bar";
9
  }