GithubHelp home page GithubHelp logo

🐛[BUG] about ant-design-charts HOT 13 CLOSED

CarolineBoyer avatar CarolineBoyer commented on August 19, 2024
🐛[BUG]

from ant-design-charts.

Comments (13)

lxfu1 avatar lxfu1 commented on August 19, 2024

run npm update

from ant-design-charts.

CarolineBoyer avatar CarolineBoyer commented on August 19, 2024

That's what I did, but didn't change a thing... =/
Still have the warning (plus my package ant-design/charts was already at last version (according to package.json : "version": "0.9.4", )

> npm view @ant-design/charts version
0.9.4

So I feel update isn't the right choice here =(

from ant-design-charts.

lxfu1 avatar lxfu1 commented on August 19, 2024

Warning or error ? I tried it with you configuration and didn't report any error.

from ant-design-charts.

CarolineBoyer avatar CarolineBoyer commented on August 19, 2024

Warnings in both console (cmd and chrome one)
I even tried

rm -rf node_modules
rm package-lock.json
npm install
npm update

Nothing was listed in

npm outdated

Re-running the component, triggers all warning on cmd console (extract)
image

and chrome console (extract as well)
image

from ant-design-charts.

CarolineBoyer avatar CarolineBoyer commented on August 19, 2024

Any change to know why this is happening or clues I could give you to help ? =(

from ant-design-charts.

lxfu1 avatar lxfu1 commented on August 19, 2024

I can't trigger this warning on Mac OS, maybe Windows wents to. do you have any other charts dependencies?

from ant-design-charts.

didiself avatar didiself commented on August 19, 2024

same

from ant-design-charts.

CarolineBoyer avatar CarolineBoyer commented on August 19, 2024

@lxfu1 This also happens when creating a Column chart using antv/g2plot.
(or if I transform it to an antd/charts) which is why I thought this was a dependency issue ?

import React from 'react';

import {Column} from '@antv/g2plot';
import {useSelector} from "react-redux";
import {StateFromAllReducers} from "../../../redux/store";
import Stat from "../../../utils/models/Stat";
import {IntlMessage} from "../../Utils/IntlMessage";


export const NbOfMessagesPerService = () => {
	let $refdom: HTMLElement | null;

	const dataStats: Stat[] = useSelector((state: StateFromAllReducers) => state.statsManagement.data);

	let data: { service: string, value: number }[] = [];
	if (dataStats.length === 0) {
		data = [{service: '', value: 0}] //handling show when empty
	} else {
		dataStats.map((oneStatData: Stat) => {
			const oneStat = new Stat(oneStatData);
			let services = oneStat.getAllCalledServices();
			if (services.length === 0) {
				data = [{service: '', value: 0}]
			} //handling show when empty
			services.map((oneServiceName: string) => {
				const index: number = data.findIndex((oneStatInData) => oneStatInData.service === oneServiceName);
				if (index !== -1 && oneStat.total) {
					data[index].value = data[index].value + oneStat.total.message_per_called_services[oneServiceName];
				} else {
					data = [...data, {
						service: oneServiceName,
						value: oneStat.total.message_per_called_services[oneServiceName]
					}]
				}
			});

		});
	}


	React.useEffect(() => {
		const chart = new Column($refdom!, {
			data,
			xField: 'service',
			xAxis: {
				visible: true,
				line: {
					visible: true
				},
				title: {
					visible: false
				}
			},
			yField: 'value',
			yAxis: {
				visible: true,
				line: {
					visible: true
				},
				title: {
					visible: false
				}
			},
		});

		chart.render();
		return function cleanup() {
			$refdom = null;
		}
	}, []);

	return (
		<div>
			<div className="ant-statistic-title">
				<IntlMessage id={"MONITORING_STATISTICS_MESSAGES_PER_SERVICE_TITLE"}/>
			</div>
			<div
				ref={(e) => ($refdom = e)}
			/>
		</div>
	)
};

If I comment the two charts, those warnings disappear.

from ant-design-charts.

jorgesierra avatar jorgesierra commented on August 19, 2024

I faced the same issue. I made the warnings go away by excluding /node_modules/@antv/ from the source-map-loader rule in my webpack config. Hope it helps.

{
        enforce: 'pre',
        test: /\.jsx?$/,
        loader: 'source-map-loader',
        exclude: [
          /node_modules\/@antv/
        ]
}

from ant-design-charts.

appdevcanada avatar appdevcanada commented on August 19, 2024

Hi guys,

what I could detect is:
at isSupported (node_modules/@antv/g2plot/src/plots/word-cloud/wordcloud2.ts:119:12)
at Object. (node_modules/@antv/g2plot/src/plots/word-cloud/wordcloud2.ts:134:3)
at Object. (node_modules/@antv/g2plot/src/plots/word-cloud/layer.ts:10:1)
at Object. (node_modules/@antv/g2plot/src/plots/word-cloud/index.ts:7:1)
at Object. (node_modules/@antv/g2plot/src/plots/index.ts:22:1)
at Object. (node_modules/@antv/g2plot/src/index.ts:8:1)
at Object. (node_modules/@ant-design/charts/lib/area/index.js:12:15)
at Object. (node_modules/@ant-design/charts/lib/index.js:308:36)
at Object. (src/App.js:3:1)
at Object. (src/App.test.js:4:1)

THERE'S NO FOLDER: node_modules/@antv/g2plot/src, ANYWHERE ON MY LAPTOP

Also, when you hover the cursor to jump to the folder in the console, the line with /area/index.js is OK, but the one with /src/index.js not anymore, meaning there's no folder for that.

from ant-design-charts.

lxfu1 avatar lxfu1 commented on August 19, 2024

Upgrade 1.0.

from ant-design-charts.

keremnalbant avatar keremnalbant commented on August 19, 2024

I have the same thing here, over 700 warnings, even I ctrl+click to the directories, it opens them
image

from ant-design-charts.

mortezakarimi64 avatar mortezakarimi64 commented on August 19, 2024

I have the same problem.
My installed version is 2.1.2

from ant-design-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.