function renderSimpleChart(renderAt, data, chartConfig, width="100%", height="250", chartType="column2d") {
			
		let fusioncharts;
		
		function createChart() {
			// Remove o gráfico existente se houver
			if (fusioncharts) {
				fusioncharts.dispose();
			}
			
			let config = {
				type: chartType,
				renderAt: renderAt,
				width: width,
				height: height,
				dataFormat: 'json',
				dataSource: {
					"chart": {
						"showValues": "1",
						"theme": "fusion",
						"paletteColors": "#8b8fd7, #9e78d0, #c660c5, #df8492, #fbcc8a, #e9ec80, #b0e17a, #87e2bb, #8aeaec, #5967ea",
						"plottooltext": `<b>${chartConfig.xAxisName}:</b> $label<br/><b>Total:</b> $value`,
						...chartConfig,
						
					},
					"data": data
				}
			};

			FusionCharts.ready(function () {
				fusioncharts = new FusionCharts(config);
				fusioncharts.render();
			});
		}
		
		// Renderiza o gráfico inicial
		createChart();
		
		// Adiciona listener para redimensionamento da janela
		let resizeTimeout;
		window.addEventListener('resize', function() {
			clearTimeout(resizeTimeout);
			resizeTimeout = setTimeout(function() {
				createChart();
			}, 250); // Aguarda 250ms após o usuário parar de redimensionar
		});
}
