Giter Site home page Giter Site logo

aleastchs / scalajs-google-charts Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 100 KB

Type-safe and Scala-friendly facade-library over Google Charts

License: MIT License

Scala 98.92% HTML 1.08%
scalajs-google-charts google-charts scala scalajs facade

scalajs-google-charts's Introduction

scalajs-google-charts

Type-safe and Scala-friendly facade-library over Google Charts

branch master

Current version

Ongoing: 0.5.1.Test

Published: 0.4.6.Final

Warning!

Versions Below 1.0.0 means it can be unstable or not containing the most of the funcionallities

Versions That I've used in other projects:

scalajs-google-charts v0.4.0 with Scala 2.11 and sbt 0.13.x,
scalajs-google-charts v0.4.1 with Scala 2.11 and sbt 0.13.x

How To Use

In {root}/build.sbt add:

lazy val scalajsGoogleChartsVersion = "<FACADE_VERSION>"
lazy val chartsScalaVersion = "2.11"
lazy val chartsSbtVersion = "0.13"

lazy val googleChartsUrl = "https://dl.bintray.com/aleastchs/aleastChs-releases/org.aleastChs/scalajs-google-charts/scala_"+ chartsScalaVersion +"/sbt_"+ chartsSbtVersion +"/"+ scalajsGoogleChartsVersion +"/jars/scalajs-google-charts.jar"

libraryDependencies ++= Seq(
"org.aleastChs" % "scalajs-google-charts" % scalajsGoogleChartsVersion from googleChartsUrl
)

Now You are able to use the Facade with imports in .scala-files Example.scala:

import aleastchs.googleCharts.google.visualization.Timeline
object Example {
    val timeline = new Timeline("some Div")
}

or

import aleastchs.googleCharts.google
object Example {
    val timeline = new google.visualization.Timeline("some Div")
}

About

I wanted to use Timeline Chart (https://developers.google.com/chart/interactive/docs/gallery/timeline) for an ungoing project (https://github.com/kristoferB/SP), so I started implement it under googleTimeSeries branch.

Then I realised that somebody else also wanted to use Google Charts for their project so it would be nice to only add a libraryDependency!

Contribute

Feel free to help me with this library

scalajs-google-charts's People

Contributors

aleastchs avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

astrandens

scalajs-google-charts's Issues

Problem With JSName

JSName("google.visualization.DataTable")
@js.native
class DataTable ... {
...
...
}

Gives error:
... google.visualization.google.visualization.DataTable not found ...

setOnLoadCallback

Error: GoogleChartsLoaded is undefined
Fix: Implement google.setOnLoadCallback(function...)

Not compatible with scalajs-react 1.x.x+

Versions that I get to work with facade
val scalaJSReactVersion = "0.11.3"
val scalaCssVersion = "0.5.1"

When I change to
scalajs-react v1.1.0,
scalacss v0.5.3,

I get strange errors on the gui-side like:
Uncaught $c_jl_AssertionError

On New Version Publishing

What to do when creating a new version?
Must change on every publish?
SNAPSHOT is disabled on bintray?

data is not a member of TimelineHelper

[error] ...: value data is not a member of aleastchs.googleCharts.helpers.chartsHelp.TimelineHelper
[error] val helper2 = TimelineHelper(timelineElement2, helper.data.toJSON(), "CopyOfData")
[error]

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.