xhacker / teachart Goto Github PK
View Code? Open in Web Editor NEWSimple and intuitive iOS chart library. Contribution graph, clock chart, and bar chart.
License: MIT License
Simple and intuitive iOS chart library. Contribution graph, clock chart, and bar chart.
License: MIT License
The order of weekdays seems to be hard coded, where the week always starts on Sunday. Would it be possible to change this in order to support locales where the week starts on Monday?
I guess one way to achieve this could be by adding 1 to the index (in case the week starts on Monday) and doing a modulus by 7 afterwards.
It would be great if this could be implemented.
how can we show data of selected days in contribution graph?
My code is like:
- (NSInteger )valueForDay:(NSUInteger)day
{
return 4;
}
which show 4 grade data for all the days (1-31) what if i want to show data for only 13th and 14th date? how to do that?
Hello,
according to the docs Storyboard is supported so I was assuming programmatic approach should work too, but it is not explicitly stated.
If using programmatically it is currently not possible to use an own delegate
because loadDefaults()
will be invoked first thing in the initWithFrame/-Coder
. So setting the delegate after that has no effect.
As a workaround I am currently using plain init
and I have exposed loadDefaults
in the .h
.
It would be great if this is supported right away. Or am I missing something?
Love the charts!
Best,
Masa
any swift demos or sample code? or bridging header file?
can i use this library for swift 5?
Things I’d like if you’re adding tests for this project:
Tooling: XCTest
Notes:
-drawRect:
s (especially in TEAContributionGraph.m
) firstFirst, thanks for the great library! I'm opening this issue since it's a bit more code than can comfortably fit in a pull request. Currently all 3 charts : Bar, Contribution and Clock are not visible to blind users or anyone using the VoiceOver utility in iOS (Settings > General > Accessibility > VoiceOver).
When used in an app, such as the Demo project: Bar and Clock charts are ignored (as can be verified using the Xcode Accessibility Inspector in Developer Tools) and Contribution chart outputs unusable information since it defaults to each block acting as a button.
I have fixed this issue by implementing the UIAccessibility methods defined here. Since the branch I modified these on edited the implementation files of all 3 classes and the README, I'm opening this issue to both bring your attention to the feature as well as suggest that I open a pull request that fixes the above.
Note that the accessibility feature in no way affects regular use of TEAChart in any way. These methods simply allow users who rely on VoiceOver to now use the data contained in the chart.
It would be awesome to have a callback when a user selects a certain date in the contribution graph! A couple ideas: draw the calendar using subviews, or use a collectionview. both would be a major undertaking, though.
This is my code..!
TEABarChart *barChart = [[TEABarChart alloc] initWithFrame:CGRectMake(0.0, 0.0, barView.frame.size.width, barView.frame.size.height)];
barChart.barColors = @[[UIColor grayColor]];
barChart.data = @[@2, @7, @1, @8, @2, @8, @10, @23];
[barView addSubview:barChart];
i have given 8 values but showing 7 bars only
Nice UIView subclass, exactly what I needed for lots of lightweight bar charts.
I've spotted an issue with the drawing when the Bar Chart's width divided by number of bars isn't a whole number.
E.g. a width of 320 and 12 bars produces (colours for illustration purposes :-) ):
It looks to me like you could maybe add some minor padding logic by detecting remainders with fmodf.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.