Skip to content

Commit

Permalink
merge from upstream master v2.1.2 and bar chart wrong position fix
Browse files Browse the repository at this point in the history
try to fix wrong position bug. use entry.xIndex instead of j of dataSet.entryCount to calculate the offset and position

apply the same logic for getMarkerPosition

add fix for horizontal bar chart

merge from upstream master

Wrong demo navigation title

Maximum negative value was confused...

Removed unused code

startAtZeroEnabled killed that range when all values are negative

Bound check for horizontal bars was wrong (Fixed issue ChartsOrg#211)

Fixed a crash when removing an entry (Fixed issue ChartsOrg#203)

Removed redundant calls

Inverted axis mode taken care of in stacked bars

Added back the 3rd dataset in demo project

Bumped to 2.1.1

Improvements to stacked bars

Major improvements to Highlights

Improvements concerning value-drawing in barcharts.

Improvements and bugfixes concerning highlighting.

Fix ChartMarker position for stacked-bars

Removed redundant function

Feature to allow forcing YAxis label-count

Bumped to 2.1.2

CONTRIBUTING.md

You will now see this when creating new issues. Ha ha!
  • Loading branch information
liuxuan30 committed Jul 28, 2015
1 parent 15b3f43 commit 948141f
Show file tree
Hide file tree
Showing 35 changed files with 1,074 additions and 543 deletions.
49 changes: 49 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# How to contribute

Bug-fixes and features often come from users of the Charts framework, and improving it greatly. We want to keep it as easy as possible to contribute changes that improve the experience for users all around the world. There are a few guidelines that we
need contributors to follow so that we can have a chance of keeping on
top of things.

## Simple issues and bug reports

If you are reporting a bug which can be observed visually, please add to your issue either:

* Screenshots, if the bug is easily explainable
* A working sample project that we can compile, run, and immediately observe the issue

## Getting Started with Contributions

* Make sure you have a [GitHub account](https://github.com/signup/free)
* Submit a ticket for your issue, assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Make sure you fill in the earliest version (or commit number) that you know has the issue.
* Fork the repository on GitHub

## Making Changes

* Create a topic branch from where you want to base your work. This is usually the master branch.
* Make commits of logical units.
* Make sure your code conforms to the code style around it. It's easy, just look around!
* If you have made changes back and forth, or have made merges, your commit history might look messy and hard to understand. A single issue or change should still be in one commit. So please squash those commits together and rebase them however you need to - to make our lives easier when reading it later.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your commit messages are in the proper format.

````
First line must be up to 50 chars (Fixes #1234)
The first line should be a short statement as to what have changed, and should also include an issue number, prefixed with a dash.
The body of the message comes after an empty new line, and describes the changes
more thoroughly, especially if there was a special case handled there,
or maybe some trickery that only code wizards can understand.
````

* Make sure you have tested your changes well.
* If your changes could theoretically affect some other component or case, which you do not necessarily use, you still have to test it.
* Create a Pull Request from your topic branch to the relevant branch in the main repo. If you go to the main repo of the framework, you'll see a big green button which pretty much prepares the PR for you. You just have to hit it.

## Making Trivial Changes

For changes of a trivial nature to comments and documentation, it is not
always necessary to create a new ticket. In this case, it is
appropriate to start the first line of a commit with '(doc)' instead of
a ticket number. Even the default commit message the GitHub generates is fine with us.
2 changes: 1 addition & 1 deletion Charts.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Charts"
s.version = "2.1.0"
s.version = "2.1.2"
s.summary = "ios-charts is a powerful & easy to use chart library for iOS"
s.homepage = "https://github.com/danielgindi/ios-charts"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand Down
32 changes: 28 additions & 4 deletions Charts/Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
55E356581ADC63CD00A57971 /* BubbleChartDataEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55E356551ADC63CD00A57971 /* BubbleChartDataEntry.swift */; };
55E356591ADC63CD00A57971 /* BubbleChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55E356561ADC63CD00A57971 /* BubbleChartDataSet.swift */; };
55E3565B1ADC63EB00A57971 /* BubbleChartRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55E3565A1ADC63EB00A57971 /* BubbleChartRenderer.swift */; };
5B0032451B6524AD00B6A2FE /* ChartHighlight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B0032441B6524AD00B6A2FE /* ChartHighlight.swift */; };
5B0032471B6524D300B6A2FE /* ChartRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B0032461B6524D300B6A2FE /* ChartRange.swift */; };
5B0032491B6525FC00B6A2FE /* ChartHighlighter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B0032481B6525FC00B6A2FE /* ChartHighlighter.swift */; };
5B00324B1B652BF900B6A2FE /* BarChartHighlighter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B00324A1B652BF900B6A2FE /* BarChartHighlighter.swift */; };
5B00324D1B65351C00B6A2FE /* HorizontalBarChartHighlighter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B00324C1B65351C00B6A2FE /* HorizontalBarChartHighlighter.swift */; };
5B378F171AD500A4009414A4 /* ChartAnimationEasing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B378F161AD500A4009414A4 /* ChartAnimationEasing.swift */; };
5B4BCD3E1AA9C0A60063F019 /* ChartFillFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B4BCD3D1AA9C0A60063F019 /* ChartFillFormatter.swift */; };
5B4BCD401AA9C4930063F019 /* ChartTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B4BCD3F1AA9C4930063F019 /* ChartTransformer.swift */; };
Expand All @@ -23,7 +28,6 @@
5B680D221A9D17C30026A057 /* ChartXAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6D1A9D151C00CE82E1 /* ChartXAxis.swift */; };
5B680D231A9D17C30026A057 /* ChartYAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6E1A9D151C00CE82E1 /* ChartYAxis.swift */; };
5B680D271A9D17C30026A057 /* ChartColorTemplates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC791A9D151C00CE82E1 /* ChartColorTemplates.swift */; };
5B680D281A9D17C30026A057 /* ChartHighlight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC7A1A9D151C00CE82E1 /* ChartHighlight.swift */; };
5B680D291A9D17C30026A057 /* ChartSelectionDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC7B1A9D151C00CE82E1 /* ChartSelectionDetail.swift */; };
5B680D2A1A9D17C30026A057 /* ChartUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC7C1A9D151C00CE82E1 /* ChartUtils.swift */; };
5B680D3D1A9D1AD90026A057 /* Charts.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B680D3C1A9D1AD90026A057 /* Charts.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -92,6 +96,11 @@
55E356551ADC63CD00A57971 /* BubbleChartDataEntry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BubbleChartDataEntry.swift; sourceTree = "<group>"; };
55E356561ADC63CD00A57971 /* BubbleChartDataSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BubbleChartDataSet.swift; sourceTree = "<group>"; };
55E3565A1ADC63EB00A57971 /* BubbleChartRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BubbleChartRenderer.swift; sourceTree = "<group>"; };
5B0032441B6524AD00B6A2FE /* ChartHighlight.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartHighlight.swift; sourceTree = "<group>"; };
5B0032461B6524D300B6A2FE /* ChartRange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartRange.swift; sourceTree = "<group>"; };
5B0032481B6525FC00B6A2FE /* ChartHighlighter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartHighlighter.swift; sourceTree = "<group>"; };
5B00324A1B652BF900B6A2FE /* BarChartHighlighter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarChartHighlighter.swift; sourceTree = "<group>"; };
5B00324C1B65351C00B6A2FE /* HorizontalBarChartHighlighter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HorizontalBarChartHighlighter.swift; sourceTree = "<group>"; };
5B378F161AD500A4009414A4 /* ChartAnimationEasing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartAnimationEasing.swift; sourceTree = "<group>"; };
5B4BCD3D1AA9C0A60063F019 /* ChartFillFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartFillFormatter.swift; sourceTree = "<group>"; };
5B4BCD3F1AA9C4930063F019 /* ChartTransformer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartTransformer.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -161,7 +170,6 @@
5BA8EC751A9D151C00CE82E1 /* ChartDataApproximatorFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartDataApproximatorFilter.swift; sourceTree = "<group>"; };
5BA8EC761A9D151C00CE82E1 /* ChartDataBaseFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartDataBaseFilter.swift; sourceTree = "<group>"; };
5BA8EC791A9D151C00CE82E1 /* ChartColorTemplates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartColorTemplates.swift; sourceTree = "<group>"; };
5BA8EC7A1A9D151C00CE82E1 /* ChartHighlight.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartHighlight.swift; sourceTree = "<group>"; };
5BA8EC7B1A9D151C00CE82E1 /* ChartSelectionDetail.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartSelectionDetail.swift; sourceTree = "<group>"; };
5BA8EC7C1A9D151C00CE82E1 /* ChartUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartUtils.swift; sourceTree = "<group>"; };
5BB6EC1C1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartTransformerHorizontalBarChart.swift; sourceTree = "<group>"; };
Expand All @@ -180,6 +188,18 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
5B0032431B65247600B6A2FE /* Highlight */ = {
isa = PBXGroup;
children = (
5B0032441B6524AD00B6A2FE /* ChartHighlight.swift */,
5B0032461B6524D300B6A2FE /* ChartRange.swift */,
5B0032481B6525FC00B6A2FE /* ChartHighlighter.swift */,
5B00324A1B652BF900B6A2FE /* BarChartHighlighter.swift */,
5B00324C1B65351C00B6A2FE /* HorizontalBarChartHighlighter.swift */,
);
path = Highlight;
sourceTree = "<group>";
};
5B680D1E1A9D170B0026A057 /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -259,6 +279,7 @@
5BA8EC691A9D151C00CE82E1 /* Components */,
5BA8EC6F1A9D151C00CE82E1 /* Data */,
5BA8EC741A9D151C00CE82E1 /* Filters */,
5B0032431B65247600B6A2FE /* Highlight */,
5B759ED41A9F98A90039D97F /* Renderers */,
5BA8EC781A9D151C00CE82E1 /* Utils */,
);
Expand Down Expand Up @@ -343,7 +364,6 @@
children = (
5BA8EC791A9D151C00CE82E1 /* ChartColorTemplates.swift */,
5B4BCD3D1AA9C0A60063F019 /* ChartFillFormatter.swift */,
5BA8EC7A1A9D151C00CE82E1 /* ChartHighlight.swift */,
5BA8EC7B1A9D151C00CE82E1 /* ChartSelectionDetail.swift */,
5B4BCD3F1AA9C4930063F019 /* ChartTransformer.swift */,
5BB6EC1C1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift */,
Expand Down Expand Up @@ -432,7 +452,6 @@
buildActionMask = 2147483647;
files = (
5B680D1F1A9D17C30026A057 /* ChartAxisBase.swift in Sources */,
5B680D281A9D17C30026A057 /* ChartHighlight.swift in Sources */,
5B4BCD3E1AA9C0A60063F019 /* ChartFillFormatter.swift in Sources */,
5B6A54DE1AA74516000F57C2 /* RadarChartDataSet.swift in Sources */,
5B680D211A9D17C30026A057 /* ChartLimitLine.swift in Sources */,
Expand Down Expand Up @@ -463,6 +482,7 @@
5B6A54801AA5DF28000F57C2 /* ChartYAxisRendererHorizontalBarChart.swift in Sources */,
5B6A54D21AA74516000F57C2 /* CandleChartDataEntry.swift in Sources */,
5B6A54CC1AA74516000F57C2 /* BarChartData.swift in Sources */,
5B00324D1B65351C00B6A2FE /* HorizontalBarChartHighlighter.swift in Sources */,
5B6A54CE1AA74516000F57C2 /* BarChartDataSet.swift in Sources */,
5B6A54871AA669F4000F57C2 /* RadarChartRenderer.swift in Sources */,
5B6A548D1AA66A60000F57C2 /* ChartLegendRenderer.swift in Sources */,
Expand Down Expand Up @@ -492,7 +512,9 @@
55E356571ADC63CD00A57971 /* BubbleChartData.swift in Sources */,
5B6A54DF1AA74516000F57C2 /* ScatterChartData.swift in Sources */,
5B6A54D31AA74516000F57C2 /* CandleChartDataSet.swift in Sources */,
5B0032491B6525FC00B6A2FE /* ChartHighlighter.swift in Sources */,
5B6A54D71AA74516000F57C2 /* ChartDataSet.swift in Sources */,
5B00324B1B652BF900B6A2FE /* BarChartHighlighter.swift in Sources */,
5B6A54781AA5DEF0000F57C2 /* ChartXAxisRendererRadarChart.swift in Sources */,
5B6A54A71AA66BA7000F57C2 /* PieRadarChartViewBase.swift in Sources */,
5B6A546E1AA5D2DC000F57C2 /* ChartAnimator.swift in Sources */,
Expand All @@ -504,7 +526,9 @@
5B6A54CD1AA74516000F57C2 /* BarChartDataEntry.swift in Sources */,
5B6A54D41AA74516000F57C2 /* CombinedChartData.swift in Sources */,
5B680D2A1A9D17C30026A057 /* ChartUtils.swift in Sources */,
5B0032451B6524AD00B6A2FE /* ChartHighlight.swift in Sources */,
5B680D201A9D17C30026A057 /* ChartLegend.swift in Sources */,
5B0032471B6524D300B6A2FE /* ChartRange.swift in Sources */,
5BD8F06E1AB89AD800566E05 /* HorizontalBarChartView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Loading

0 comments on commit 948141f

Please sign in to comment.