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

Stacked Area not working #708

Closed
phobos7000 opened this issue Apr 10, 2020 · 2 comments
Closed

Stacked Area not working #708

phobos7000 opened this issue Apr 10, 2020 · 2 comments

Comments

@phobos7000
Copy link

Hello Ely,
First of all, I would like to tell you that your work on this library is very impressive.
However, I'm trying to create a stacked area chart by setting "stacked" in "barGrouping" but nothing change.
May be I'm doing something wrong.
Please find below a example of code that I'm using for my test and a picture to illustrate my problem.

var MONS = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
	var arrDataTimeline2ser = [
		{
			name  : 'Actual Sales',
			labels: MONS,
			values: [1500, 4600, 5156, 3167, 8510, 8009, 6006, 7855, 12102, 12789, 10123, 15121]
		},
		{
			name  : 'Proj Sales',
			labels: MONS,
			values: [1000, 2600, 3456, 4567, 5010, 6009, 7006, 8855, 9102, 10789, 11123, 12121]
		}
	];

// Simple Slide
let pptx = new PptxGenJS();
let slide = pptx.addSlide();
var optsChartLine2 = { x:7, y:0.6, w:'45%', h:3,
chartColors: ['0088CC', '99FFCC'],
chartColorsOpacity: 25,
valAxisLabelRotate: 5,
dataBorder: {pt:2, color:'FFFFFF'},
showValue: false,
fill: 'D1E1F1',
barGrouping: 'stacked'
};
slide.addChart( pptx.charts.AREA, arrDataTimeline2ser, optsChartLine2 );

pptx.writeFile();
pptxgenjs_stacked_area_chart

@pimlottc-gov
Copy link

pimlottc-gov commented Apr 22, 2020

Note that the change for stacked area charts (#333) hasn't been released yet. It should be in 3.2.0.

@gitbrent
Copy link
Owner

@pimlottc-gov is correct. This feature is now available with the recent v3.2.0 release.

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

3 participants