-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add explainable word cloud (#18)
--------- Co-authored-by: RoxaneBurri <[email protected]> Co-authored-by: spaenleh <[email protected]>
- Loading branch information
1 parent
8bf7703
commit fd8f2f2
Showing
10 changed files
with
721 additions
and
548 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { useState } from "react"; | ||
import Wordcloud from "./Wordcloud"; | ||
import { defaultWords1 } from "./data"; | ||
|
||
const App = () => { | ||
const [showBounds, setShowBounds] = useState(false); | ||
const [showWordBounds, setShowWordBounds] = useState(false); | ||
|
||
return ( | ||
<div style={{ flexDirection: "column", alignItems: "center" }}> | ||
<fieldset> | ||
<legend>Settings</legend> | ||
<div style={{ display: "flex", flexDirection: "column", gap: 10 }}> | ||
<div> | ||
<input | ||
id="showBounds" | ||
name="showBounds" | ||
type="checkbox" | ||
value={showBounds.toString()} | ||
onChange={() => setShowBounds((p) => !p)} | ||
/> | ||
<label htmlFor="showBounds">Show bounds</label> | ||
</div> | ||
|
||
<div> | ||
<input | ||
id="showWordBounds" | ||
name="showWordBounds" | ||
type="checkbox" | ||
value={showWordBounds.toString()} | ||
onChange={() => setShowWordBounds((p) => !p)} | ||
/> | ||
<label htmlFor="showWordBounds">Show Word bounds</label> | ||
</div> | ||
|
||
<div> | ||
<button onClick={() => window.location.reload()}>Update</button> | ||
</div> | ||
</div> | ||
</fieldset> | ||
<Wordcloud | ||
data={defaultWords1} | ||
showBounds={showBounds} | ||
showWordBounds={showWordBounds} | ||
/> | ||
</div> | ||
); | ||
}; | ||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.