mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
add emotion styling to chord (#578)
This commit is contained in:
parent
2d317774d6
commit
297343ec6e
@ -28,8 +28,10 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@superset-ui/style": "^0.13.26",
|
||||
"d3": "^3.5.17",
|
||||
"prop-types": "^15.6.2"
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.13.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@superset-ui/chart": "^0.13.0",
|
||||
|
@ -1,36 +0,0 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
.superset-legacy-chart-chord svg #circle circle {
|
||||
fill: none;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.superset-legacy-chart-chord svg .group path {
|
||||
fill-opacity: 0.6;
|
||||
}
|
||||
|
||||
.superset-legacy-chart-chord svg path.chord {
|
||||
stroke: #000;
|
||||
stroke-width: 0.25px;
|
||||
}
|
||||
|
||||
.superset-legacy-chart-chord svg #circle:hover path.fade {
|
||||
opacity: 0.2;
|
||||
}
|
@ -21,7 +21,6 @@ import d3 from 'd3';
|
||||
import PropTypes from 'prop-types';
|
||||
import { CategoricalColorNamespace } from '@superset-ui/color';
|
||||
import { getNumberFormatter } from '@superset-ui/number-format';
|
||||
import './Chord.css';
|
||||
|
||||
const propTypes = {
|
||||
data: PropTypes.shape({
|
||||
|
@ -16,7 +16,44 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { reactify } from '@superset-ui/chart';
|
||||
import styled from '@superset-ui/style';
|
||||
import PropTypes from 'prop-types';
|
||||
import Component from './Chord';
|
||||
|
||||
export default reactify(Component);
|
||||
const ReactComponent = reactify(Component);
|
||||
|
||||
const Chord = ({ className, ...otherProps }) => {
|
||||
return (
|
||||
<div className={className}>
|
||||
<ReactComponent {...otherProps} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Chord.defaultProps = {
|
||||
otherProps: {},
|
||||
};
|
||||
|
||||
Chord.propTypes = {
|
||||
className: PropTypes.string.isRequired,
|
||||
otherProps: PropTypes.objectOf(PropTypes.any),
|
||||
};
|
||||
|
||||
export default styled(Chord)`
|
||||
.superset-legacy-chart-chord svg #circle circle {
|
||||
fill: none;
|
||||
pointer-events: all;
|
||||
}
|
||||
.superset-legacy-chart-chord svg .group path {
|
||||
fill-opacity: 0.6;
|
||||
}
|
||||
.superset-legacy-chart-chord svg path.chord {
|
||||
stroke: #000;
|
||||
stroke-width: 0.25px;
|
||||
}
|
||||
.superset-legacy-chart-chord svg #circle:hover path.fade {
|
||||
opacity: 0.2;
|
||||
}
|
||||
`;
|
Loading…
Reference in New Issue
Block a user