Git Product home page Git Product logo

highchartsst's Introduction

HighchartsSt

GitHub release Build Status Coverage Status Javascript Dependency Status

A Highcharts/Highstock Js API wrapper for Smalltalk

Table of Contents

ย 

Installation

HighchartsSt has been tested and used in Pharo, GemStone/S 64 and VA Smalltalk, but should likely work in other dialects too.

The builder (the tool that auto-generates the code), however, only works on Pharo.

Prerequisites

By default we load the stable version of Seaside, but the wrapper will likely work on any Seaside 3 version. So you can lock the Seaside baseline to whatever version you're using.

Basic Installation

You can load the framework with (change master to some released version if you wan't a pinned version):

Metacello new
	baseline: 'HighchartsSt';
	repository: 'github://ba-st/HighchartsSt:master/repository';
	load.

Loading groups

There's several groups to choose when loading:

  • Highcharts will load the runtime support for Highcharts
  • Highstock will load the runtime support for Highstock
  • Tools will load the code generation tool
  • Development will load all the packages including the tests and the code generation tool

Getting Started

To have Highcharts working, the only thing you must do is to register the wanted HighchartsLibrary into your app root class (notice there are 3 possible subclasses of it). Example:

yourApp
		addLibrary: JQDevelopmentLibrary;
		addLibrary: Highcharts6OnlineLibrary.

Then you can render a basic chart like this:

renderBarGovermentComputersChartOn: html

	| chart series data |

	data := OrderedCollection new
		add: (ChartDatum belongingTo: 'Facebook' withValue: 515333);
		add: (ChartDatum belongingTo: 'YouTube' withValue: 178001);
		add: (ChartDatum belongingTo: 'GMail' withValue: 154504);
		add: (ChartDatum belongingTo: 'Twitter' withValue: 184083);
		add: (ChartDatum belongingTo: 'Amazon' withValue: 100762);
		add: (ChartDatum belongingTo: 'Pandora' withValue: 78868);
		yourself.
	series := ChartSeries named: 'John' composedOf: data.

	html text: 'chart: '.
	chart := html highcharts newChart.
	chart yAxis title text: 'Visits'.
	chart legend enabled: false.
	chart chart type: 'column'.
	chart title text: 'Sites visited on D.C. government computers'.
	chart subtitle text: 'Source: District of Columbia'.
	chart xAxis title text: 'Site'.
	chart xAxis type: 'category'.
	chart plotOptions column colorByPoint: true.
	chart plotOptions column dataLabels enabled: true.
	(chart addSeriesForType: 'column')
		index: 0;
		name: series name;
		data: (series dataAsPointsOn: html).
	html div script: chart

The default installation of Highcharts includes some examples. You can start your Seaside adaptors, for example like this:

(ZnZincServerAdaptor port: 9999)
   	codec: GRPharoUtf8Codec new;
   start.

And then watch the live examples with your browser in http://localhost:9999/HighchartsDemo

Running the tests

Tests are auto-generated for the auto-generated code. These are under the packages HighchartsStV6-Tests and HighstockStV6-Tests. We warned that there's more than 40K test so it will take a while to run, and later be shown in the Test Runner.

Future work

Besides the issues, the following are also desired features:

  • Support Highmaps
  • Improve documentation
  • Improve CI Support to test independently the several groups available
  • Deploy the examples to the cloud
  • Automatically propose Pull Requests when new versions of Highcharts are available

Authors

See also the list of contributors who participated in this project.

License

This wrapper is licensed under the MIT License. Any contribution submitted to this repository is considered to be under the MIT license.

For licensing details about the underlying Javascript library see the About Highcharts section below.

About Highcharts Js

Highcharts Js is an interactive Javascript charting library developed by Highsoft AS. The library is Free for Non-Comercial use, for details about the library licensing see the shop

highchartsst's People

Contributors

gcotelli avatar marianopeck avatar mtabacman avatar

Watchers

James Cloos avatar  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.