Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nestedPieChart's setData() function is abnormal #791

Open
testdrive-profiling-master opened this issue Mar 29, 2023 Discussed in #790 · 0 comments
Open

nestedPieChart's setData() function is abnormal #791

testdrive-profiling-master opened this issue Mar 29, 2023 Discussed in #790 · 0 comments

Comments

@testdrive-profiling-master
Copy link

Discussed in #790

Originally posted by testdrive-profiling-master March 29, 2023

	const el = document.getElementById('chart_memory');
	let data = {
	categories: ['Total', 'Read & Write'],
	series: [
	  {
		name: 'main',
		data: [
		  {
			name: 'IMEM',
			data: 0.0001,
		  },
		  {
			name: 'WMEM',
			data: 0.0001,
		  },
		  {
			name: 'CLMEM',
			data: 0.0001,
		  },
		  {
			name: 'DLMEM',
			data: 0.0001,
		  },
		],
	  },
	  {
		name: 'partial',
		data: [
		  {
			name: 'IMEM read',
			parentName: 'IMEM',
			data: 0.0001,
		  },
		  {
			name: 'IMEM write',
			parentName: 'IMEM',
			data: 0.0001,
		  },
		  {
			name: 'WMEM read',
			parentName: 'WMEM',
			data: 0.0001,
		  },
		  {
			name: 'WMEM write',
			parentName: 'WMEM',
			data: 0.0001,
		  },
		  {
			name: 'CLMEM read',
			parentName: 'CLMEM',
			data: 0.0001,
		  },
		  {
			name: 'CLMEM write',
			parentName: 'CLMEM',
			data: 0.0001,
		  },
		  {
			name: 'DLMEM read',
			parentName: 'DLMEM',
			data: 0.0001,
		  },
		  {
			name: 'DLMEM write',
			parentName: 'DLMEM',
			data: 0.0001,
		  },
		],
	  },
	],
	};
	const options = {
		chart: { title: 'Usage of internal memory', width: 550, height: 400},
		series: {
			main: {
				dataLabels: {visible: true},
				radiusRange: {
					inner: '20%',
					outer: '50%',
				},
			},
			partial: {
				dataLabels: {visible: true,
					pieSeriesName: {
						visible: true,
						anchor: 'outer'
					}
				},
				radiusRange: {
				  inner: '55%',
				  outer: '85%',
				},
			},
		},
		tooltip: {formatter: (value) => `${value}MB`},
		theme: {
			series: {
				main: {
					dataLabels: {
						fontSize: 10,
					},
				},
				partial: {
					dataLabels: {
						fontSize: 10,
					},
				},
			},
		}
	};

	chart_memory = toastui.Chart.nestedPieChart({ el, data, options });   // normal.
	chart_memory.setData(data);   // abnormal at the label in pie chart??

chart = toastui.Chart.nestedPieChart(~) is ok for run,
image

but when I use setData function with same data, label in pie chart is not visible.

image

@testdrive-profiling-master testdrive-profiling-master changed the title nestedPieChart 문제 nestedPieChart's setData() function is abnormal Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant