-
-
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
how to draw a graph having x value but no values in y #467
Comments
milanhap
changed the title
i entry all data in yVals no data with having xIndex
i entry all data in yVals no data with having xIndex. for example Suppose: xIndexes ["Apples", "Oranges", "Strawberries"] and just set: yVals []. and i got erorr in let entryFrom = dataSet.entryForXIndex(_minX)! // nil while unwrapping an Optional value let entryTo = dataSet.entryForXIndex(_maxX)! any solutation to draw graph in above condition
Oct 13, 2015
milanhap
changed the title
i entry all data in yVals no data with having xIndex. for example Suppose: xIndexes ["Apples", "Oranges", "Strawberries"] and just set: yVals []. and i got erorr in let entryFrom = dataSet.entryForXIndex(_minX)! // nil while unwrapping an Optional value let entryTo = dataSet.entryForXIndex(_maxX)! any solutation to draw graph in above condition
i entry all data in yVals no data with having xIndex. for example Suppose: xIndexes ["Apples", "Oranges", "Strawberries"] and just set: yVals []. i got erorr in below line let entryFrom = dataSet.entryForXIndex(_minX)! // nil while unwrapping an Optional value any solutation to draw graph in above condition
Oct 13, 2015
milanhap
changed the title
i entry all data in yVals no data with having xIndex. for example Suppose: xIndexes ["Apples", "Oranges", "Strawberries"] and just set: yVals []. i got erorr in below line let entryFrom = dataSet.entryForXIndex(_minX)! // nil while unwrapping an Optional value any solutation to draw graph in above condition
how to draw a graph having x value but no values in y
Oct 13, 2015
I have no problem drawing such charts with charts demo. NSMutableArray *xVals = [[NSMutableArray alloc] init];
for (int i = 0; i < count; i++)
{
[xVals addObject:months[i % 12]];
}
BarChartDataSet *set1 = [[BarChartDataSet alloc] initWithYVals:@[] label:@"DataSet"];
set1.barSpace = 0.35;
NSMutableArray *dataSets = [[NSMutableArray alloc] init];
[dataSets addObject:set1];
BarChartData *data = [[BarChartData alloc] initWithXVals:xVals dataSets:dataSets];
[data setValueFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:10.f]];
_chartView.data = data; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i entry all data in yVals no data with having xIndex.
for example
Suppose: xIndexes ["Apples", "Oranges", "Strawberries"] and just set: yVals [].
i got erorr in below line
let entryFrom = dataSet.entryForXIndex(_minX)! // nil while unwrapping an Optional value
any solutation to draw graph in above condition
The text was updated successfully, but these errors were encountered: