gradio-pr-bot commited on
Commit
5bab27b
·
verified ·
1 Parent(s): ef80128

Upload folder using huggingface_hub

Browse files
6.2.0/plot/Index.svelte CHANGED
@@ -63,5 +63,16 @@
63
  on_clear_status={() =>
64
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
65
  />
66
- <Plot {gradio} />
 
 
 
 
 
 
 
 
 
 
 
67
  </Block>
 
63
  on_clear_status={() =>
64
  gradio.dispatch("clear_status", gradio.shared.loading_status)}
65
  />
66
+ <Plot
67
+ value={gradio.props.value}
68
+ theme_mode={gradio.props.theme_mode}
69
+ show_label={gradio.shared.show_label}
70
+ caption={gradio.props.caption}
71
+ bokeh_version={gradio.props.bokeh_version}
72
+ show_actions_button={gradio.props.show_actions_button}
73
+ _selectable={gradio.props._selectable}
74
+ x_lim={gradio.props.x_lim}
75
+ show_fullscreen_button={gradio.props.show_fullscreen_button}
76
+ on_change={() => gradio.dispatch("change")}
77
+ />
78
  </Block>
6.2.0/plot/shared/Plot.svelte CHANGED
@@ -6,7 +6,29 @@
6
  import type { PlotEvents, PlotProps } from "../types";
7
  import { untrack } from "svelte";
8
 
9
- let { gradio }: { gradio: Gradio<PlotEvents, PlotProps> } = $props();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  let PlotComponent: any = $state(null);
12
  let loaded_plotly_css = $state(false);
@@ -22,8 +44,6 @@
22
  let loadedPlotTypeMapping = {};
23
 
24
  const is_browser = typeof window !== "undefined";
25
-
26
- let value = $derived(gradio.props.value);
27
  let _type = $state(null);
28
 
29
  $effect(() => {
@@ -45,23 +65,22 @@
45
  }
46
  _type = type;
47
  });
48
- gradio.dispatch("change");
49
  });
50
  </script>
51
 
52
- {#if gradio.props.value && PlotComponent}
53
  {#key key}
54
  <PlotComponent
55
- value={gradio.props.value}
56
  colors={[]}
57
- theme_mode={gradio.props.theme_mode}
58
- show_label={gradio.shared.show_label}
59
- caption={gradio.props.caption}
60
- bokeh_version={gradio.props.bokeh_version}
61
- show_actions_button={gradio.props.show_actions_button}
62
- {gradio}
63
- _selectable={gradio.props._selectable}
64
- x_lim={gradio.props.x_lim}
65
  bind:loaded_plotly_css
66
  on:select
67
  />
 
6
  import type { PlotEvents, PlotProps } from "../types";
7
  import { untrack } from "svelte";
8
 
9
+ let {
10
+ value,
11
+ theme_mode,
12
+ caption,
13
+ bokeh_version,
14
+ show_actions_button,
15
+ _selectable,
16
+ x_lim,
17
+ show_fullscreen_button,
18
+ show_label,
19
+ on_change
20
+ }: {
21
+ value: null | string;
22
+ theme_mode: ThemeMode;
23
+ caption: string;
24
+ bokeh_version: string | null;
25
+ show_actions_button: boolean;
26
+ _selectable: boolean;
27
+ x_lim: [number, number] | null;
28
+ show_fullscreen_button: boolean;
29
+ show_label: boolean;
30
+ on_change: () => void;
31
+ } = $props();
32
 
33
  let PlotComponent: any = $state(null);
34
  let loaded_plotly_css = $state(false);
 
44
  let loadedPlotTypeMapping = {};
45
 
46
  const is_browser = typeof window !== "undefined";
 
 
47
  let _type = $state(null);
48
 
49
  $effect(() => {
 
65
  }
66
  _type = type;
67
  });
68
+ on_change();
69
  });
70
  </script>
71
 
72
+ {#if value && PlotComponent}
73
  {#key key}
74
  <PlotComponent
75
+ {value}
76
  colors={[]}
77
+ {theme_mode}
78
+ {show_label}
79
+ {caption}
80
+ {bokeh_version}
81
+ {show_actions_button}
82
+ {_selectable}
83
+ {x_lim}
 
84
  bind:loaded_plotly_css
85
  on:select
86
  />