Hi! I am using TeeChart for android.
I am setting the scale of the x-Axis to DateTime
bottomChart.getAxes().getBottom().setIncrement(Utils.getDateTimeStep(DateTimeStep.ONEDAY));
bottomChart.getAxes().getBottom().getLabels().setDateTimeFormat("dd.MM.yyyy");
But i only wanna show the time range for a 7-days-chart from 9.00am to 6.00pm for each day, not 24 hours
same problem when i a using DateTimeStep.ONEMONTH or ONEWEEK
How i solve it? I cannot find a example.
Thanks for ur help!
Michael
[Teechart Android]show X-Axis each day only from 9am to 6pm?
Re: [Teechart Android]show X-Axis each day only from 9am to 6pm?
Hi Michael,
I'm not sure to understand what do you exactly mean. However, I guess it should be possible to use the getLabel event (through the Chat's AxisLabelResolver) to format or hide (setting an empty string) the desired axis labels.
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
I'm not sure to understand what do you exactly mean. However, I guess it should be possible to use the getLabel event (through the Chat's AxisLabelResolver) to format or hide (setting an empty string) the desired axis labels.
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: [Teechart Android]show X-Axis each day only from 9am to 6pm?
The documentation of AxisLabelResolver is not the best. Do u have an example how to use it?
Re: [Teechart Android]show X-Axis each day only from 9am to 6pm?
Ok i cannot send u the project but with a picture u will findout what i what to achieve
This a week chart with a Daystep as increment But i wanna display the chart only from 9am to 6pm
For example here: The solution would be the chart without the orange gaps.
Any idea?
Thanks for ur help
Michael
This a week chart with a Daystep as increment But i wanna display the chart only from 9am to 6pm
For example here: The solution would be the chart without the orange gaps.
Any idea?
Thanks for ur help
Michael
Re: [Teechart Android]show X-Axis each day only from 9am to 6pm?
Hi Michael,
Here you have it:micha wrote:The documentation of AxisLabelResolver is not the best. Do u have an example how to use it?
Code: Select all
tChart1.setAxisLabelResolver(new AxisLabelResolver() {
@Override
public void scrollModHandler(Axis a, ScrollModEventArgs e) { }
@Override
public NextAxisLabelValue getNextLabel(Axis axis, int labelIndex, NextAxisLabelValue nextLabel) {
return nextLabel;
}
@Override
public String getLabel(Axis axis, ISeries s, int valueIndex, String labelText) {
if (axis == tChart1.getAxes().getBottom()) {
//modify labelText when needed
}
return labelText;
}
});
It sound pretty much what Axis Break tool does. Please, take a look at the example at "What's new?\Welcome!\New Chart tools\Axis breaks" in the features demo included with the TeeChart Java installation (desktop version). If you only have the TeeChart Java for Android version, you can download the TeeChart Java evaluation version to see the examples the desktop version includes.micha wrote:The solution would be the chart without the orange gaps.
Any idea?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: [Teechart Android]show X-Axis each day only from 9am to 6pm?
ok thanks the Axis Break tool seems to be the solution.
But one more question. How can i prevent the overlapping of axis label when i use the axis break tool?
Thanks again.
But one more question. How can i prevent the overlapping of axis label when i use the axis break tool?
Thanks again.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: [Teechart Android]show X-Axis each day only from 9am to 6pm?
Hi micha,
Can you please attach a simple example project we can run "as-is" to reproduce the problem here? A general option could be using custom axis labels as in the examples at the All Features\Welcome!\Axes\Labels section in the TeeChart.Features.jar demo.
Can you please attach a simple example project we can run "as-is" to reproduce the problem here? A general option could be using custom axis labels as in the examples at the All Features\Welcome!\Axes\Labels section in the TeeChart.Features.jar demo.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |