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

allows each subchart in the combo chart to react to the parameter showLegend #1342

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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