whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
SUPPORT
whitespace
FORUM
whitespace
FAQS
whitespace
SUBSCRIPTION
whitespace
REQUEST ON-LINE
whitespace
whitespace

Technical Support Forum

Welcome Guest Search | Active Topics | Log In | Register

Y-Axis Values Out Of Range Options · View
Vinoth
#1 Posted : Tuesday, August 28, 2012 4:54:25 PM
Rank: Advanced Member

Groups: Registered

Joined: 4/25/2012
Posts: 68
Location: India
Hi,

If i use ChartType with Spline, the curve is cutting sometime with highest axis value. Attached screenshot.
Vinoth attached the following image(s):
Out of Range.png (21kb) downloaded 35 time(s).
Baydalka Volodymyr
#2 Posted : Monday, September 03, 2012 11:04:32 AM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Try to set axis margin manually - chartArea.getDefaultYAxis().getScale().setMargin(200)

Best regards,
Volodymyr Baydalka
Andriod development and support team
Vinoth
#3 Posted : Wednesday, September 05, 2012 5:10:59 PM
Rank: Advanced Member

Groups: Registered

Joined: 4/25/2012
Posts: 68
Location: India
Yes. But i don't know what would be the maximum value. It will vary dynamically. And also if i assign for e.g, 1000, then it will be overlapped as there is no space to fit. Could you please tell me some other way to avoid this?
Vinoth
#4 Posted : Wednesday, October 31, 2012 1:36:12 PM
Rank: Advanced Member

Groups: Registered

Joined: 4/25/2012
Posts: 68
Location: India
Hi,

Could you please suggest something to solve this? I am waiting for a long time. Please do the needful.
Vinoth
#5 Posted : Friday, November 23, 2012 11:51:40 AM
Rank: Advanced Member

Groups: Registered

Joined: 4/25/2012
Posts: 68
Location: India
Could you please tell me how to fix this?
Baydalka Volodymyr
#6 Posted : Friday, November 23, 2012 3:47:12 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

You may override ChartSplineType.getYRange - and change logic of range computing.

series.setType( new ChartSplineType()
{
public DoubleRange getYRange (ChartSeries series)
{
// your logic here
}
});

Best regards,

Volodymyr Baydalka
Andriod development and support team
Vinoth
#7 Posted : Monday, November 26, 2012 10:00:01 AM
Rank: Advanced Member

Groups: Registered

Joined: 4/25/2012
Posts: 68
Location: India
Hi,

By overriding this method what can i achieve. Could you please explain briefly..?
Vinoth
#8 Posted : Thursday, November 29, 2012 1:06:11 PM
Rank: Advanced Member

Groups: Registered

Joined: 4/25/2012
Posts: 68
Location: India
Could you please help me.?
Baydalka Volodymyr
#9 Posted : Thursday, November 29, 2012 7:04:46 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Example:

Code:
class MySplineType extends ChartSplineType
{
    @Override
    public DoubleRange getYRange(ChartSeries series)
    {
        List points = series.getPointsCache();
        float[] coords = new float[2 * points.size()];
        
        for (int i = 0; i < points.size(); i++)
    {
            ChartPoint point = (ChartPoint)points.get(i);
            coords[2 * i] = (float) point.getX();
            coords[2 * i + 1] = (float) point.getY(0);
    }
        
        RectF bounds = new RectF();
        createSpline(coords).computeBounds(bounds, true);
        
      return new DoubleRange(bounds.top, bounds.bottom);         
    }
}

....

series.setType(new MySplineType());


Best regards,
Volodymyr Baydalka
Andriod development and support team
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.