-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Partition Visualization * added unit tests
- Loading branch information
1 parent
48e28ef
commit bad6938
Showing
10 changed files
with
894 additions
and
6 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions
28
superset/assets/javascripts/components/OptionDescription.jsx
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,28 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import InfoTooltipWithTrigger from './InfoTooltipWithTrigger'; | ||
|
||
const propTypes = { | ||
option: PropTypes.object.isRequired, | ||
}; | ||
|
||
// This component provides a general tooltip for options | ||
// in a SelectControl | ||
export default function OptionDescription({ option }) { | ||
return ( | ||
<span> | ||
<span className="m-r-5 option-label"> | ||
{option.label} | ||
</span> | ||
{option.description && | ||
<InfoTooltipWithTrigger | ||
className="m-r-5 text-muted" | ||
icon="question-circle-o" | ||
tooltip={option.description} | ||
label={`descr-${option.label}`} | ||
/> | ||
} | ||
</span>); | ||
} | ||
OptionDescription.propTypes = propTypes; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.partition .chart { | ||
display: block; | ||
margin: auto; | ||
font-size: 11px; | ||
} | ||
|
||
.partition rect { | ||
stroke: #eee; | ||
fill: #aaa; | ||
fill-opacity: .8; | ||
transition: fill-opacity 180ms linear; | ||
cursor: pointer; | ||
} | ||
|
||
.partition rect:hover { | ||
fill-opacity: 1; | ||
} | ||
|
||
.partition g text { | ||
font-weight: bold; | ||
pointer-events: none; | ||
fill: rgba(0, 0, 0, 0.8); | ||
} | ||
|
||
.partition g:hover text { | ||
fill: rgba(0, 0, 0, 1); | ||
} |
Oops, something went wrong.