Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8224933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:14:29+00:00 2026-06-07T15:14:29+00:00

while developing an Android application that uses Rickshaw to draw some charts, I encountered

  • 0

while developing an Android application that uses Rickshaw to draw some charts, I encountered this weird problem: on Galaxy Nexus S (having OS 4.0.4) the chart draws perfectly, while on a Motorola Defy (CyanogenMod7, having OS 2.3.7) it does not. Could this be an OS version issue? Can anyone help me with this?

Here is the code:

public class RickshawTestActivity extends Activity {
    private WebView webView;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        webView = new WebView(this);

        webView.getSettings().setJavaScriptEnabled(true);

        setContentView(webView);

        webView.loadUrl("file:///android_asset/chart.html");

    }
}

And here is assets/chart.html

<!doctype>
<script src="vendor/d3.min.js"></script>
<script src="vendor/d3.layout.min.js"></script>
<script src="rickshaw.min.js"></script>

<div id="chart"></div>

<script>
    var data = [ {
        x : 1910,
        y : 92228531
    }, {
        x : 1920,
        y : 106021568
    }, {
        x : 1930,
        y : 123202660
    }, {
        x : 1940,
        y : 132165129
    }, {
        x : 1950,
        y : 151325798
    }, {
        x : 1960,
        y : 179323175
    }, {
        x : 1970,
        y : 203211926
    }, {
        x : 1980,
        y : 226545805
    }, {
        x : 1990,
        y : 248709873
    }, {
        x : 2000,
        y : 281421906
    }, {
        x : 2010,
        y : 308745538
    } ];

    var graph = new Rickshaw.Graph({
        element : document.querySelector("#chart"),
        width : 580,
        height : 250,
        series : [ {
            color : 'steelblue',
            data : data
        } ]
    });

    graph.render();
</script>

The data is valid, and all the referenced .js files are found.
This also works in my Mozilla 13 browser.

Thanks


EDIT:

I also tested this piece of code on different emulators and concluded that the code above works only on OS versions 3.0 and above. On OS versions below 3.0, this does not work.

Now how can I make it work? Thanks

EDIT:
I need a library that is cross-platform.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:14:32+00:00Added an answer on June 7, 2026 at 3:14 pm

    I assume one ore more features Rickshaw/D3 uses is not (correctly/fully) implemented in the WebKit version shipped with Android prior to 3.0. As Webkit is part of the OS you can not change or update it separately.

    The only chance you have is using a different web browser app that has it’s own rendering engine – e.g. Firefox for Android has one as far as I remember.

    If you need an Android app that runs on 2.1+ that I only see the possibility to embed an web-renderer in your app or use client side chart generation instead. The are some libraries available that allows you to do so:

    • http://code.google.com/p/afreechart/
    • http://code.google.com/p/droidcharts/

    Both libraries are plain Java libraries that do not rely on JavaScript – hence they are independent of the WebKit version the OS contains.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an Android 2.2 application. I'm using this method to draw a text
I'm developing an Android 3.1 Tablet application that runs a service with this thread:
While developing a Launcher (Homescreen) application for Android, I've come into a security exception
While developing an application this is what i did : 1.Kept 320*480 as my
I'm developing an Android application that might be used at night. Therefor, I need
I'm developing application for android. my application has very big size (APKfile) that is
I am developping an Android application that uses a Facebook component. It would be
I am developing an android game application played using bluetooth. While searching for bluetooth
I'm developing an Android application with some native code (used to render with OpenGL
I'm developing an application for Android OS. Since this is my first application, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.