Skip to content

Conversation

kotlyarevskyy
Copy link

If the legend is active in the combo chart, but the parameter showLegend is false in one of the subcharts, then the series objects of this subchart are excluded from the legend

This is very practical if both subcharts have the same data array, which means that the same series items appear twice in the legend

const comboOptions = {

        /** orientation/ grouping*/
        barDir: chartOrientation,
        barGrouping: barGrouping,

        /** legend */
        showLegend: true,  // LEGEND IS ACTIVE
        legendPos: 'b'
      }

const comboCharts = [
        {
          type: this.pptx.ChartType.line,
          data: data,
          options: {
            showLegend: true // SERIES LABELS FROM THE LINE ARE GOING TO BE DISPLAYED
          }
        },
        {
          type: this.pptx.ChartType.area,
          data: data,
          options: {
            showLegend: false // SERIES LABELS FROM THE AREA ARE HIDDEN
          }
        }
      ]

…hart. If the legend is active in the combo chart, but the parameter showLegend is false in one of the subcharts, then the series objects of this subchart are excluded from the legend
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

Successfully merging this pull request may close these issues.

1 participant