diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/package.json b/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/package.json index 154b356322c89..84bd92de1ceab 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/package.json +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/package.json @@ -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" } } diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ParallelCoordinates.css b/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ParallelCoordinates.css deleted file mode 100644 index b86d41faf7dc9..0000000000000 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ParallelCoordinates.css +++ /dev/null @@ -1,25 +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-parallel-coordinates div.grid { - overflow: auto; -} - -.superset-legacy-chart-parallel-coordinates .grid div.row:hover { - background-color: #ccc; -} diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ParallelCoordinates.js b/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ParallelCoordinates.js index 8ffb321f3e5d4..769d539ec4b90 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ParallelCoordinates.js +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ParallelCoordinates.js @@ -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 }] diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.js b/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx similarity index 59% rename from superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.js rename to superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx index 09437bd61625e..42f1d3a734c54 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.js +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx @@ -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 ( +
+ +
+ ); +}; + +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; + } + } + } + } +`; diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js b/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js index 783cd187576be..36ac7c9d54e90 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js @@ -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,