Vicky Kumar
07/15/2022, 7:01 AMJan Soubusta
07/15/2022, 7:18 AMVicky Kumar
07/15/2022, 7:22 AMJan Soubusta
07/15/2022, 8:16 AMVicky Kumar
07/15/2022, 9:00 AMVicky Kumar
07/15/2022, 9:06 AMJan Soubusta
07/15/2022, 9:22 AMDan Homola
07/15/2022, 9:31 AMMatyáš Kandl
07/15/2022, 11:27 AM<Page>
<div style={{ height: 500 }}>
<InsightView insight={insight} showTitle={showTitle} />
</div>
</Page>
Vicky Kumar
07/15/2022, 11:44 AMVicky Kumar
07/18/2022, 7:08 AMUlku Kijasev
07/18/2022, 11:47 AMVicky Kumar
07/18/2022, 12:02 PMIvan Nejezchleb
07/18/2022, 12:10 PMIvan Nejezchleb
07/18/2022, 12:13 PMimport "@gooddata/sdk-ui-ext/styles/css/main.css";
or also others as mentioned here in this templateVicky Kumar
07/18/2022, 12:27 PMIvan Nejezchleb
07/18/2022, 12:30 PMVicky Kumar
07/18/2022, 12:37 PM<Page>
<div>
<InsightView insight={insight} showTitle={showTitle} />
</div>
</Page>
Ivan Nejezchleb
07/18/2022, 12:42 PMdocument.querySelector('.highcharts-root')
it should find one element and you should be able then check its content, size, visibility and other properties and it means that our JS code worked as expected.
If you are not able to find this element, then there is probably some other error eg in Network panel or somewhere else and chart component was not rendered properly at allVicky Kumar
07/18/2022, 1:14 PMIvan Nejezchleb
07/18/2022, 1:38 PMJiri Zajic
07/18/2022, 3:58 PM<div style={{ height: 0 }}>
<ColumnChart
measures={[Md.PageViews]}
viewBy={Md.ProductCategory}
stackBy={Md.ProductBrand}
/>
</div>
So I also think it is a styling issue. @Vicky Kumar please see the attached screenshot and let me know if the SVG element has a non-zero height on your side. We'll get to the bottom of this! 💪Vicky Kumar
07/19/2022, 5:37 AMJiri Zajic
07/19/2022, 6:19 AMVicky Kumar
07/19/2022, 9:33 AM{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@gooddata/sdk-backend-bear": "^8.9.0",
"@gooddata/sdk-model": "^8.9.0",
"@gooddata/sdk-ui": "^8.9.0",
"@gooddata/sdk-ui-charts": "^8.9.0",
"@gooddata/sdk-ui-dashboard": "^8.9.0",
"@gooddata/sdk-ui-ext": "^8.9.0",
"@gooddata/sdk-ui-filters": "^8.9.0",
"@gooddata/sdk-ui-geo": "^8.9.0",
"@gooddata/sdk-ui-pivot": "^8.9.0",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.8.7",
"classnames": "^2.3.1",
"formik": "^2.2.9",
"lodash": "^4.17.15",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
"react-router-dom": "^5.3.0",
"react-router-use-location-state": "^2.3.1",
"react-scripts": "4.0.3",
"use-location-state": "^2.3.1",
"yup": "^0.32.9"
},
"scripts": {
"start": "cross-env HTTPS=true PORT=3000 react-scripts start",
"build": "react-scripts build",
"build-with-explicit-hostname": "cross-env REACT_APP_SET_HOSTNAME=true npm run build",
"eject": "react-scripts eject",
"test": "react-scripts test --setupFilesAfterEnv ./jest.setup.js",
"testcafe-backend": "rm -R ./build & yarn build & serve -l 5000 build",
"testcafe": "cross-env TEST_BACKEND=http://localhost:5000 ./scripts/run-testcafe.js",
"testcafe-visual": "cross-env TEST_MODE=visual ./scripts/run-testcafe.js",
"refresh-md": "node ./scripts/refresh-md.js"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/core": "^7.16.5",
"@babel/plugin-transform-typescript": "^7.16.1",
"@babel/preset-env": "^7.16.5",
"@babel/preset-typescript": "^7.16.5",
"@babel/register": "^7.16.5",
"@gooddata/catalog-export": "^8.9.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
"babel-plugin-add-module-exports": "^1.0.4",
"cross-env": "^5.2.0",
"enzyme": "^3.10.0",
"husky": "^3.0.0",
"prettier": "2.5.1",
"pretty-quick": "^3.1.3",
"sass": "^1.45.1",
"serve": "^11.3.2",
"testcafe": "^1.18.3",
"typescript": "^4.1.5"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged --pattern \"**/*.*(js|jsx|ts|tsx|scss)\""
}
},
"engines": {
"node": ">=12.15.0"
}
}Vicky Kumar
07/21/2022, 6:42 AMJiri Zajic
07/21/2022, 9:29 AMJiri Zajic
07/21/2022, 9:30 AMJiri Zajic
07/21/2022, 9:32 AMshowTitle
, give it some unique string (like asdf
), and then try to look for it in the DOM. Let me know if it's there — look at my screenshot.Jiri Zajic
07/21/2022, 9:32 AMconst Home = () => {
const style = { height: '400px' };
return (
<div style={style}>
<InsightView insight="aajmxrkPC3qs" showTitle="asdf" />
</div>
);
};
Jiri Zajic
07/21/2022, 9:33 AMJiri Zajic
07/21/2022, 9:34 AMVicky Kumar
07/21/2022, 10:04 AMJiri Zajic
07/21/2022, 10:05 AMVicky Kumar
07/21/2022, 10:06 AMJiri Zajic
07/21/2022, 10:06 AMJiri Zajic
07/21/2022, 10:07 AMVicky Kumar
07/21/2022, 10:10 AMJiri Zajic
07/21/2022, 10:16 AMJiri Zajic
07/21/2022, 10:17 AMnpx --ignore-existing @gooddata/create-gooddata-react-app@0.19.1-beta.0
to create a new project, and then try to render the same Donut Chart before making any other modifications?Jiri Zajic
07/21/2022, 10:18 AMVicky Kumar
07/21/2022, 10:26 AMJiri Zajic
07/21/2022, 10:51 AMVicky Kumar
07/21/2022, 10:55 AMJiri Zajic
07/21/2022, 12:00 PMJiri Zajic
07/21/2022, 12:15 PMyarn install
before yarn run
), the screenshot and the source code.Jiri Zajic
07/21/2022, 12:15 PMJiri Zajic
07/22/2022, 10:08 AMVicky Kumar
07/25/2022, 5:27 AMJiri Zajic
07/25/2022, 7:41 AMVicky Kumar
07/25/2022, 1:36 PMUlku Kijasev
07/25/2022, 1:47 PMJiri Zajic
07/25/2022, 1:50 PM<Headline primaryMeasure={newMeasure(idRef("total_listings", "measure"), m => m.format("#,##0"))} />
.Vicky Kumar
07/26/2022, 7:58 AMJiri Zajic
07/26/2022, 8:51 AMVicky Kumar
07/27/2022, 8:30 AMJiri Zajic
07/27/2022, 8:56 AMVicky Kumar
07/27/2022, 9:02 AMJiri Zajic
07/27/2022, 9:10 AMVicky Kumar
07/27/2022, 9:45 AMJiri Zajic
07/27/2022, 9:48 AMnpm uninstall @gooddata/react-components
if you use npm, yarn remove @gooddata/react-components
if you use yarn). Please don't import anything from @gooddata/react-components, this package is outdated and not compatible with the latest version of GoodData.UI.Jiri Zajic
07/27/2022, 9:51 AMafm
property. The <Execute /> component accepts seriesBy
(typically an array of measures) and slicesBy
(typically an array of attributes).Jiri Zajic
07/27/2022, 9:52 AMimport React from "react";
import * as Md from "../md";
import Hint from "./Hint";
import { Execute } from "@gooddata/sdk-ui";
import CustomVisualization from "./CustomVisualization";
export default () => (
<>
<h1>Custom Visualization</h1>
<div style={{ height: 400 }}>
<Execute seriesBy={[Md.Revenue]} slicesBy={[Md.ProductCategory, Md.CustomerRegion]}>
{CustomVisualization}
</Execute>
</div>
<Hint />
</>
);
Where CustomVisualization.js is defined in https://github.com/gooddata/gooddata-ui-examples/blob/master/example-execute/src/App/CustomVisualization.js.Vicky Kumar
07/27/2022, 2:11 PMVicky Kumar
08/03/2022, 12:26 PMVicky Kumar
08/04/2022, 10:59 AMJan Rehanek
08/04/2022, 1:10 PMJan Rehanek
08/04/2022, 1:16 PMJan Rehanek
08/04/2022, 1:30 PMconfig
key in the actual component. See example:
<InsightView
insight={MD.Insights.StackedInsight}
config={
{
colors: [
// Bottom column
'rgb(255,192,203)',
// Top column
'rgb(157,34,53)',
// Line
'rgb(150,150,150)'
]
}
}
/>
Vicky Kumar
08/05/2022, 7:41 AMJan Rehanek
08/05/2022, 7:48 AMVicky Kumar
08/09/2022, 9:30 AMJiri Zajic
08/09/2022, 9:39 AMVicky Kumar
08/10/2022, 9:07 AMJiri Zajic
08/10/2022, 9:33 AMVicky Kumar
08/11/2022, 9:22 AMJiri Zajic
08/12/2022, 8:55 AM