Giter VIP home page Giter VIP logo

vega-mobile's Introduction

Vega Mobile

Disclaimer: this library is not endorsed and associated in any form and kind with the original authors of Vega

What is this?

This is an Android wrapper for the vega-embed library, and does not require an internet connection.

How do this work?

This library is a WebView that can render a vega description in json format. The WebView loads a html file, and the json file is converted to base64 and passed as an url parameter.

Is the library only this?

For now, yes. The next task is adding a Java class that creates a json specification. The plan is to write a renderer for Android Canvas and reimplement the original library in Java.

How can I use this in my project?

  1. First import the library to your file

    import net.pertence.VegaView

  2. Instatiate the view, for example in the onCreate()

     @override
     void onCreate(savedInstanceState: Bundle?) {
         WebView vegaView = VegaView(applicationContext);
         ...
    
  3. Load the json

         String spec = "..."
         vegaView.loadSpec(spec);
    
  4. Set the view's content

         setContentView(vegaView);
     }
    

How can I add this to my project?

In the the configuration files add:

repositories {
    ...
    maven { url "https://jitpack.io" }
}

and

dependencies {
    ...
    implementation 'com.github.pertence:vega-mobile:1.0'
}

Do you have any plans to publish in Jcenter?

Yes, however I having some issues.

Why did you create this

This was created because I wanted to use Vega in my Android application. Vega is an amazing project, because it is an visualization grammar that can be used in many projects, regardless of their implementation language.

What is the license?

The license is 3-Clause BSD License

vega-mobile's People

Contributors

pertence avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.