Skip to content

Commit

Permalink
Modify secondary axis param check. Only throw if number of valAxes is…
Browse files Browse the repository at this point in the history
… greater than 1.
  • Loading branch information
TimWatsonRuffer committed Aug 25, 2020
1 parent 532d588 commit bd877e2
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 bd877e2

Please # to comment.