ChartsOrg / ChartsOrg/Charts

Issue tapping on chart to display marker

Open
#4,518 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

* [x] I've read, understood, and done my best to follow the [*CONTRIBUTING guidelines](https://github.com/jjatie/Charts/blob/master/CONTRIBUTING.md).

## What did you do?

I have just added a CombinedChartView with a bar and line chart and the displaying of marker on tapping on it, no possibility to zoom and move on the graph. It is fixed on the view.

## What did you expect to happen?

I expected to can tap on each element (bar or line) of the chart to display a marker with associated informations, no matter where I tap on the element. If I tap on bar it is the bar informations which are display and if I tap on the line of the line chart I whould like to have point of line chart informations.
Also I hoped to be able to tap outside charts (on empty parts without line and bar) without having a displayed marker.

## What happened instead?

Often when I try to tap on a bar the marker display is the marker of the line which is further down.

An other problem occurs when I have some long bar and a line which is at the middle of it. When I tap in the lower part of the bar (below the line chart) only line’s marker is display, instead of displaying a marker associated the tapping bar or line.

It seems the tapping on the bar chart is possible only on the upper part of bar but I would like to can tapped all over the bar and all over the line chart to display the associated marker.

Also when I tap outside charts (line or bar), marker is displayed but it shouldn’t, normally nothing should be displayed.

## Charts Environment

**Charts version/Branch/Commit Number:** 3.6.0
**Xcode version:** Xcode 12.0.1
**Swift version:** Swift 5
**Platform(s) running Charts:** iOS
**macOS version running Xcode:** macOS Catalina 10.15.7

## Demo Project

I have tested the process on the combined chart of the demo project of the lib. I have just kept the bar and the line chart, remove the double tapping to zoom and add the displaying of the marker(radarMarker) on tapping on chart.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.