Comments (1)
You can do it with add multi different color bar plot.
Like this;
let barPlotFair = BarPlot(identifier: "fair")
barPlotFair.barWidth = 10
barPlotFair.shouldRoundBarCorners = true
barPlotFair.barLineWidth = 0
barPlotFair.barLineColor = UIColor.white
barPlotFair.barColor = UIColor.red
barPlotFair.adaptAnimationType = ScrollableGraphViewAnimationType.elastic
barPlotFair.animationDuration = 1.5
let barPlotGood = BarPlot(identifier: "good")
barPlotGood.barWidth = 10
barPlotGood.shouldRoundBarCorners = true
barPlotGood.barLineWidth = 0
barPlotGood.barLineColor = UIColor.white
barPlotGood.barColor = UIColor.yellow
barPlotGood.adaptAnimationType = ScrollableGraphViewAnimationType.elastic
barPlotGood.animationDuration = 1.5
let barPlotGreat = BarPlot(identifier: "great")
barPlotGreat.barWidth = 10
barPlotGreat.shouldRoundBarCorners = true
barPlotGreat.barLineWidth = 0
barPlotGreat.barLineColor = UIColor.white
barPlotGreat.barColor = UIColor.green
barPlotGreat.adaptAnimationType = ScrollableGraphViewAnimationType.elastic
barPlotGreat.animationDuration = 1.5
graphView.addPlot(plot: barPlotFair)
graphView.addPlot(plot: barPlotGood)
graphView.addPlot(plot: barPlotFair)
Select Data Like This;
func value(forPlot plot: Plot, atIndex pointIndex: Int) -> Double {
if plot.identifier == "fair" {
return barPlotDataFair[pointIndex]
}
if plot.identifier == "good"{
return barPlotDataGood[pointIndex]
}
if plot.identifier == "great" {
return barPlotDataGreat[pointIndex]
}
return barPlotData[pointIndex]
}
from scrollablegraphview.
Related Issues (20)
- Bar Chart with individual columns having varying widths?
- unable to set dot on multiple graph HOT 1
- app crashes on func. - setPlotPointPositions(forNewlyActivatedPoints activatedPoints: [Int], withData data: [Double]) when i scroll the graph HOT 4
- Maximum Number of Points on screen
- DotPlot are not clickable HOT 3
- Ease out animation bug
- y-axis dynamic value instead of original value.
- Carthage Compile error
- How to Create a Stacked Bar Chart? HOT 1
- App crashed every time a value is added HOT 3
- App crash on startup
- As I change the min and max the reference lines text doesn't change HOT 1
- Error installing ScrollableGraphView from Cocopod
- pointIndex - current day
- Is there a way to stop the graph trailing to 0 at the beginning and end of a plot? HOT 2
- Crashing if all the values for Y axis are 0
- put a number related to each bar index
- change the color of each column
- Bar Chart customisations
- Points HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrollablegraphview.