Skip to content
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

Size of the graphical view is wrong when there is another view on top of it #6

Closed
GoogleCodeExporter opened this issue Mar 25, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create any graph with AChartEngine
2. Use another view on top of this graph ( I had a sliding drawer, from 
miscWidget on GoogleCode )
3. Move the sliding drawer

What is the expected output? What do you see instead?
The size of the graph was not the correct one.


Please provide a source code snippet that we can use to replicate the 
issue.


What version of the product binary library are you using?
Hum.. The last one ??

Please provide any additional information below.

Actually, I kind of fix it :
Changing graphicalView from :
 @Override
  protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    canvas.getClipBounds(mRect);
    int top = mRect.top;
    int left = mRect.left;
    int width = mRect.width();
    int height = mRect.height();
    mChart.draw(canvas, left, top, width, height);
  }

To :
 @Override
  protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    canvas.getClipBounds(mRect);
    int top = mRect.top;
    int left = mRect.left;
    //int width = mRect.width();
    //int height = mRect.height();
    int width = canvas.getWidth();
    int height = canvas.getHeight();
    mChart.draw(canvas, left, top, width, height);
  }


Note that it implies that the full graph view will be drawned every time, 
even if half of it is hidden. But I don't think it is such a big deal...


Original issue reported on code.google.com by emmanuel...@gmail.com on 16 May 2010 at 3:12

@GoogleCodeExporter
Copy link
Author

Not sure I understand the fix you provided.
Your fix makes the chart take the entire canvas height, but in the canvas there 
may be other views needing space.

Dan

Original comment by dandrome...@gmail.com on 21 Jun 2010 at 6:25

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

This is more of a help than Issue: I want to show the graph as a ImageView on 
my layout which have some text above and some text below the ImageView. Can 
this be done by any chance? 

Original comment by NidhiAga...@gmail.com on 27 Jul 2010 at 10:02

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

@nidhi

check XYChartBuilder on how to place a chart into a custom Layout. 
XYChartBuilder creates the view you can see at http://www.achartengine.org/

Original comment by marc.log...@gmail.com on 28 Jul 2010 at 9:09

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Original comment by dandrome...@gmail.com on 16 Nov 2010 at 5:17

  • Changed state: Invalid
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant