Skip to content

Commit

Permalink
chore(plugin-chart-parallel-coordinates): convert para coords chart t…
Browse files Browse the repository at this point in the history
…o emotion styling (apache#641)

* convert para coords chart to emotion styling

* Update package.json

* Update index.js

* Update package.json

* Update package.json
  • Loading branch information
pkdotson authored and zhaoyongjie committed Nov 17, 2021
1 parent 45da490 commit 9726324
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
},
"dependencies": {
"d3": "^3.5.17",
"prop-types": "^15.6.2"
"prop-types": "^15.7.2"
},
"peerDependencies": {
"@superset-ui/chart": "^0.14.0",
"@superset-ui/color": "^0.14.0",
"@superset-ui/translation": "0.13.3"
"@superset-ui/style": "^0.14.3",
"@superset-ui/translation": "0.13.3",
"react": "^16.13.1"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { getSequentialSchemeRegistry } from '@superset-ui/color';
import parcoords from './vendor/parcoords/d3.parcoords';
import divgrid from './vendor/parcoords/divgrid';
import './vendor/parcoords/d3.parcoords.css';
import './ParallelCoordinates.css';

const propTypes = {
// Standard tabular data [{ fieldName1: value1, fieldName2: value2 }]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,35 @@
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import styled from '@superset-ui/style';
import { reactify } from '@superset-ui/chart';
import PropTypes from 'prop-types';
import Component from './ParallelCoordinates';

export default reactify(Component);
const ReactComponent = reactify(Component);

const ParallelCoordianes = ({ className, ...otherProps }) => {
return (
<div className={className}>
<ReactComponent {...otherProps} />
</div>
);
};

ParallelCoordianes.propTypes = {
className: PropTypes.string.isRequired,
};

export default styled(ParallelCoordianes)`
.superset-legacy-chart-parallel-coordinates {
div.grid {
overflow: auto;
div.row {
&:hover {
background-color: #ccc;
}
}
}
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const metadata = new ChartMetadata({
export default class ParallelCoordinatesChartPlugin extends ChartPlugin {
constructor() {
super({
loadChart: () => import('./ReactParallelCoordinates.js'),
loadChart: () => import('./ReactParallelCoordinates'),
metadata,
transformProps,
controlPanel,
Expand Down

0 comments on commit 9726324

Please sign in to comment.