I have added the following 4 dates in my Chart View, in TimeSeries.
2-Jan-2013
3-Jan-2013
4-Jan-2013
7-Jan-2013
When I see the result in the emulator, the graph shows 5th and 6th Jan also. How do I remove the dates which I have not included?
I am preparing a chart to show traffic during working days. So, I want to add the next Monday immediately after this Friday. Please suggest any solution.
You can fix the behavior by calling:
renderer.setXRoundedLabels(false);
Related
I have a date-based graph with x-axis as dates. By default, I populate the graph with a data set of past 6 months. I would like to change the graph to show:
Last one week,
Last one month,
Last 3 months etc.
I looked at the API documentation for modifying the viewport here: https://github.com/PhilJay/MPAndroidChart/wiki/Modifying-the-Viewport
And tried playing around with:
graph.setVisibleXRangeMaximum(100);
graph.moveViewToX(50);
graph.invalidate();
I tried various different parameters, but nothing happens when the above code is executed. My graph already has data filled and is displaying correctly.
Am I looking in the right direction for what I want to achieve? How can I debug my issue?
For those interested, I found the solution.
TL;DR: There is no in-built functionality to change the granularity of the data shown. You need to set the chart's data-set accordingly.
Here is the example from samples: https://github.com/PhilJay/MPAndroidChart/blob/master/MPChartExample/src/main/java/com/xxmassdeveloper/mpchartexample/LineChartTime.java
I want to display a DatePicker, that contains only a calendar, but i get this kind of bug:
Screen with error
I found some people had this kind of problem too, but have somebody found a solution for this?
It occurs on Api > 21, most of resolutions.
Found out that this can be easily reproduced after we set the Setting->Display->Display Size to Large. And then go to a month that needs to show 6 rows. The Google Calendar app have the same problem.
So it should be a bug in the DatePicker. The only easy solution is to change the datepicker to the spinner style.
I am trying to set time in an Android time picker which is of 12 hours format.
I am unable to select AM/PM by clicking or by swiping.
sendKeys() works only for hours and minutes fields and not for AM/PM.
Any ideas to solve this?
Thanks in advance
Is any error message coming ? Which strategy do you use to find AM/PM Element ? Sometimes Appium fails to locate element so try to change your strategy to find element also try Tapping that element.
I am working on a project where i have to horizontally scroll between dates.I don't want to use a date picker.I would like to have two arrows for previous and next buttons.When i click on the next button the next date should be shown.Also each time a new date is selected i want to call a web service by passing the particular date.How do i go about doing this?
I have considered using a horizontal date picker library but i am not satisfied with the solutions which i am finding on the internet.
You can use ViewPager for the same.
When i display a Datepicker in most api versions of android the month is displayed like this:
But in api level 10 the month is displayed like this:
So i want to know if there is a way to force the month to be displayed with only 3 letters and remove the backslash
A quick study of every method for DatePicker has revealed that there is no way to do it through code. I suspect that if the size of it is chosen correctly, the 3 letters might still appear, but I don't have the time to do a trial/error on that hypothesis.