Skip to content

Commit

Permalink
Merge pull request #832 from twatson83/secondaryAxisCheckFix
Browse files Browse the repository at this point in the history
Fix secondary axis param check
  • Loading branch information
gitbrent authored Aug 26, 2020
2 parents 50c7359 + bd877e2 commit ee14214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gen-charts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ export function makeXmlCharts(rel: ISlideRelChart): string {
// B: Axes -----------------------------------------------------------
if (rel.opts._type !== CHART_TYPE.PIE && rel.opts._type !== CHART_TYPE.DOUGHNUT) {
// Param check
if (rel.opts.valAxes && !usesSecondaryValAxis) {
if (rel.opts.valAxes && rel.opts.valAxes.length > 1 && !usesSecondaryValAxis) {
throw new Error('Secondary axis must be used by one of the multiple charts')
}

Expand Down

0 comments on commit ee14214

Please # to comment.