kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
84 stars 23 forks source link

[Enhancement] Add invisible click handler to charts #1723

Open lydemann opened 3 years ago

lydemann commented 3 years ago

Add invisible click handler to charts

Describe the enhancement

Add invisible click handler to charts as stacked invisible handler, for bar and column charts

Describe the solution you'd like

Like for the Highcharts charts, an invisible click handler should be added to the charts

Have you considered any alternatives?

Are there any additional context?


Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Refinement

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review:

RasmusKjeldgaard commented 3 years ago

@lydemann what is the use case for this? I am not quite sure I understand what an invisible click handler is, as opposed to the one that you would add via custom options, as described in interacting with charts.

lydemann commented 3 years ago

It's the same behavior as the deprecated chart, with making it easier to click on a column if it is small by registering the click above using a stacked invisible click handler

RasmusKjeldgaard commented 3 years ago

@lydemann Please provide a visualization. It is unfortunately not well documented on the existing chart.

lydemann commented 3 years ago

It is hard to visualize something that is invisible. You click above the column and the column gets selected, that's it.

RasmusKjeldgaard commented 3 years ago

Ah okay, I think I can help you with a visualization then. If I click where the dot is, it should select the bar, right? Chartjs invisible bar

RasmusKjeldgaard commented 3 years ago

@henrikvoetmand and I agree that it should be default behavior, and thus implemented in Kirby, and not via customOptions in a project.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because of no recent activity. It will be closed in 10 weeks if no further activity occurs. Thank you for your contributions.

MadsBuchmann commented 2 years ago

Still relevant - would be a nice addition to the chart.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because of no recent activity. It will be closed in 10 weeks if no further activity occurs. Thank you for your contributions.