Stacked Area Charts have undrawn areas when data_columns contain negative values
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
Hi,
the topic explains the Issue. When you change one of the values to negative in http://c3js.org/samples/chart_area_stacked.html , you will see what i mean.
columns: [
['data1', 300, 350, 300, 0, 0, 120],
['data2', 130, 100, -140, 200, 150, 50]]
This happens on chart_types 'area' and 'area-spline'. The path for the area is drawn over 'area points' genereated in 'generateGetAreaPoints()'. these points dont contain the intersection points with x-axis. adding them would let it show quite better. for chart_type 'area-spline' adding point let it look better but the path is drawn over 'Quadratic Bezier Curves' so adjusting the 'control point' should maybe one more step.
Why am explaining all this. the draw functions are confusing me. the information i gave maybe help someone else by fixing this problem.
Contributor guide
Assessment
This issue has not been assessed yet.