carbon-charts icon indicating copy to clipboard operation
carbon-charts copied to clipboard

[usability]:

Open AmirHussain93 opened this issue 2 years ago • 0 comments

Contact Details

[email protected]

Environment

Browser

What happened? What did you expect to happen instead?

I am trying to include the export and download option for the bar chart. I am using the toolbar and controls parameters available in the options https://github.com/carbon-design-system/carbon-charts/blob/0421232ded84c3c3c52cf98ebe568277ba600626/packages/core/demo/data/toolbar.ts#L58:~:text=options.toolbar.,%5D%3B

But I don't see any of the icons on the screen. Instead, I keep getting this error message Screenshot 2022-06-21 at 1 56 14 PM

Could you please guide me on how to make use of this toolbar.control to get export and download functionality?

What WCAG 2.1 checkpoint does the issue violate?

It doesn't violate any thing

Version

"@carbon/charts": "0.41.82"

Data & options used

this.data = [
			{
				"group": "Azure",
				"provider": "Azure",
				"value": 1200,
				"count": 1200
			},
			{
				"group": "AWS",
				"provider": "AWS",
				"value": 400,
				"count": 400
			},
			{
				"group": "GCP",
				"provider": "GCP",
				"value": 980,
				"count": 980
			},
			
		];
		this.options = {
			"axes": {
					"left": {
							"mapsTo": "count"
					},
					"bottom": {
							"mapsTo": "provider",
							"scaleType": "labels"
					}
			},
			"legend": {
				"enabled": false,
			},
			"tooltip": {
				"customHTML": tooltipObj => this.customTooltipFun(tooltipObj),
				"controls": []
			},
			"toolbar": {
				"enabled": true,
				"numberOfIcons": 1,
				"controls": [
					{
						type: 'Export as CSV',
					}
				]
			},
			"height": "280px"
		};

Relevant log output

No response

Codesandbox example

No response

AmirHussain93 avatar Jun 21 '22 08:06 AmirHussain93