ChartsOrg / ChartsOrg/Charts

Crash using highlighted value in combined charts

Open
#5,116 1 comment 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?

1. I created a combined chart with scatter and bar charts.
2. Highlighted a scatter value.

## What did you expect to happen?

No crashes

## What happened instead?

App crashes

## Reason?

The bar chart will have the same index as the scatter, and instead of highlighting the scatter, it tries to highlight the bar chart.

## DGCharts Environment

**DGCharts version/Branch/Commit Number:** 5.0.0 / master
**Xcode version:** 15.0.1 (15A507)
**Swift version:** 5.9
**Platform(s) running DGCharts:** Simulator iPhone 15 iOS 17.0.1
**macOS version running Xcode:** Sonoma 14.0

## Demo Project
https://github.com/danielgindi/Charts/assets/24472528/3a53c4e2-25a9-417a-8152-574c82d0e8e4

https://github.com/barabashd/Charts/tree/combined_data_crash_example

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.