ChartsOrg / ChartsOrg/Charts

Thin candles in case of huge x values

Open
#1,851 10 comments 1 reaction 0 assignees View on GitHub
bug question
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Hi!

I have some strange problem with Charts 3.0 when I wish to draw candles with huge x values in ChartDataEntry at CombinedChartView.

I use unixtime values as x values and got this:
![candles_combined_chart](https://cloud.githubusercontent.com/assets/20908177/20425136/a53e812c-ad92-11e6-9d4b-b4fb9e09c593.png)

If I change x values to a small numbers like 1,2,3 ... etc everything is ok.

As far as I investigated in CandleStickChartRenderer.swift there are some different values generated in valueToPixelMatrix with small and huge x values.

Please help!

Contributor guide

Open the contributing guide

Research direction

Start in CandleStickChartRenderer.swift and inspect how valueToPixelMatrix handles Unix-time x values in CombinedChartView. Compare the generated values for huge x coordinates with the small-number case shown in the report. Done means candlesticks render with normal widths when using large x values.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
data-visualization, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.