Skip to content

[Feature Request]: Stacked Column Series - Getting the series that was clicked from the event args in seriesMouseLeftButtonDown #2119

@norikois

Description

@norikois

Which component(s) are affected?

Other/unknown (please specify in the description)

Description

In IgcDataChartComponent with IgcStackedColumnSeries, it would be good to be able to get the clicked series from event args in seriesMouseLeftButtonDown.

Reproduction

  1. Start the attached sample.
  2. Click one of the column fragments.
    -> Observe the brower dev tool's console.

Actual:
Series information, such as title, valueMemberPath, etc., cannot directly be obtained from the event args.

Expected:
Series information can directly be obtained from the event args.

C00245668-wcStackedColumnChartApp3.zip

Workaround

stackedColumnChart1.seriesMouseLeftButtonDown = (s: IgcSeriesViewerComponent, ev: IgcDataChartMouseButtonEventArgs) => {
    console.log('Stacked Column Chart 1 seriesClick');
    console.log(`[Item] ${JSON.stringify(ev.item)}`);

    // It would be good to be able to directly get the series that was clicked from the event args.
    // Actually, ev.series is IgcColumnFragmentComponent
    // and it neither exposes APIs to get access to its corresponding IgcStackedColumnSeries nor can be casted to it.
    console.log(`[Series] Title: ${ev.series.title}, ValueMemberPath: ${ev.series.valueMemberPath}`);

    // Workadound
    // const dataSourceName = sampleData1.includes(ev.item) ? 'sampleData1' : sampleData2.includes(ev.item) ? 'sampleData2' : 'unknown';
    // console.log(`[Data Source] ${dataSourceName}`);
    // switch(dataSourceName) {
    //     case 'sampleData1':
    //         console.log(`[Series Info] Title: ${stackedColumnValue1Series.title}, ValueMemberPath: ${stackedColumnValue1Series.valueMemberPath}`);
    //         break;
    //     case 'sampleData2':
    //         console.log(`[Series Info] Title: ${stackedColumnValue2Series.title}, ValueMemberPath: ${stackedColumnValue2Series.valueMemberPath}`);
    //         break;
    //     default:
    //         console.log('Unknown data source');
    // }
}

Is this a regression?

No or unsure. This never worker, or I haven't tried before.

Affected versions

"igniteui-webcomponents-charts": "^6.3.1"

Browser/OS/Node environment

Browser: Chrome 145.0.7632.117
OS: Windows 11 25H2
Node: v24.0.0
npm: 11.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    🆕 status: newThe issue is new and will be reviewed when somebody picks it up.feature-request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions