-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bar chart bar value outline #4432
base: master
Are you sure you want to change the base?
Conversation
The color and insets can be adjusted so shadow effect (of the value bar) can be simulated if needed
…ix objc compilation error (BarChartBarValueOutline) Stop drawing on the last outline that precedes that condition. Add additive operator to the NSUIEdgeInsets.
CI failed - strange, xCode Version 11.6 (11E708) is able to compile the changes without any issues. Objc, Swift and Mac. |
# Conflicts: # Charts.xcodeproj/project.pbxproj # Source/Charts/Renderers/BarChartRenderer.swift
…ocol) in the DemoBaseViewController.m
Hello. |
This would be easy to accomplish by creating a custom renderer if #4297 was merged. |
# Conflicts: # Charts.xcodeproj/project.pbxproj
…issing architecture build error by enabling build active arch only in debug. # Conflicts: # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected] # Tests/ChartsTests/__Snapshots__x86__/BarChartTests/[email protected]
# Conflicts: # Source/Charts/Renderers/BarChartRenderer.swift
…cate why no outline is present
Goals ⚽
BarChart - add ability to imitate bar shadows by outlines. An outline has a color and size (insets).
Example:
Implementation Details 🚧
IBarChartDataSet.swift - BarChartBarValueOutline
Do not draw the outlines if result bar width/height is less than 1. Stop drawing on the last outline that precedes that condition.
Value bar is a rect inside the outlines.
Border is drawn inside the outlines.
Testing Details 🔍
Tests for the narrow and wide bars are added. With and without the value labels.
Stacked bar test + same with value bar border.