We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Adding a series like in the example:
var MONS = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; var dataChartLine = [ { name: 'Proj Sales', labels: MONS, values: [1000, 2600, 3456, 4567, 5010, 6009, 7006, 8855, 9102, 10789, 11123, 12121] } ]; slide.addChart( pptx.charts.LINE, dataChartLine, { x:4.3, y:4.0, w:4.0, h:3.2, chartColors:['0088CC','99FFCC'], chartColorsOpacity:25, dataBorder: {pt:2, color:'FFFFFF'}, fill:'D1E1F1' } );
creates a chart that displays a legend item for each label in the MONS set.
When trying it with v1.7.0 everything looks fine. Graphs with two series display correctly.
The text was updated successfully, but these errors were encountered:
Hi @andrei-cs ,
Thanks for opening this issue!
The defect was triggered when using a single data series along with the chartColors option.
chartColors
var MONS = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; var pptx = new PptxGenJS(); pptx.setLayout('LAYOUT_WIDE'); var slide = pptx.addNewSlide(); var dataChartLine = [{ name: 'Proj Sales', labels: MONS, values: [1000, 2600, 3456, 4567, 5010, 6009, 7006] }]; var dataChartLine2 = [ { name: 'Proj Sales 1', labels: MONS, values: [2000, 2600, 3456, 4567, 5010, 6009, 7006] }, { name: 'Proj Sales 2', labels: MONS, values: [2100, 2600, 3456, 4567, 5010, 6009, 7006] } ]; slide.addChart( pptx.charts.LINE, dataChartLine, { x:.5, y:1, w:6, h:3, chartColors:['0088CC'],showLegend: true }); slide.addChart( pptx.charts.LINE, dataChartLine, { x:.5, y:4, w:6, h:3, showLegend: true }); slide.addChart( pptx.charts.LINE, dataChartLine2, { x:6.5, y:1, w:6, h:3, chartColors:['0088CC'],showLegend: true }); pptx.save('PptxGenJS-Sandbox_'+getTimestamp());
Before:
After:
Sorry, something went wrong.
Fix for Issue #225
2654b68
Added Issue #225
1da0061
Thanks for the quick response. I guess it will go out with 1.10.0 release.
Yes, it's tagged for v1.10.0 - it'll be released this month.
gitbrent
No branches or pull requests
Adding a series like in the example:
var MONS = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
var dataChartLine = [
{
name: 'Proj Sales', labels: MONS,
values: [1000, 2600, 3456, 4567, 5010, 6009, 7006, 8855, 9102, 10789, 11123, 12121]
}
];
slide.addChart(
pptx.charts.LINE, dataChartLine,
{ x:4.3, y:4.0, w:4.0, h:3.2, chartColors:['0088CC','99FFCC'], chartColorsOpacity:25,
dataBorder: {pt:2, color:'FFFFFF'}, fill:'D1E1F1' }
);
creates a chart that displays a legend item for each label in the MONS set.
When trying it with v1.7.0 everything looks fine. Graphs with two series display correctly.
The text was updated successfully, but these errors were encountered: