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

Width of a bar Options · View
hectorharvey
#1 Posted : Monday, February 07, 2011 12:15:58 AM
Rank: Newbie

Groups: Registered

Joined: 2/1/2011
Posts: 5
Location: Atlanta
Can you tell me how to determine the width of a bar in a column chart? I allow the user to select a bar, and if it is too small, it's hard to select with a finger. So I want to allow zoom up to a certain point, based on the width of the bar.
Baydalka Volodymyr
#2 Posted : Monday, February 07, 2011 5:08:47 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Check following code
Code:
public float measureColumnWidth(ChartArea area, ChartSeries series)
{
    PointF startPoint = new PointF();
    PointF endPoint = new PointF();
    DoubleRange sbsInfo = ChartRenderArgs.getSideBySideOffset(series, series.getType(), area);
    ChartTransform transform = ChartTransform.create(series);
    
    transform.getPoint(sbsInfo.Minimum, 0, startPoint);
    transform.getPoint(sbsInfo.Maximum, 0, endPoint);
    
    return endPoint.x - startPoint.x;
}


NOTE : do not use this method before ChartView appears.

Best regards,
Volodymyr Baydalka
Andriod development and support team
hectorharvey
#3 Posted : Tuesday, February 08, 2011 6:31:02 AM
Rank: Newbie

Groups: Registered

Joined: 2/1/2011
Posts: 5
Location: Atlanta
Perfect. Thanks.
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.