Skip to content

Commit

Permalink
Removed unused packages and updated usage documentation
Browse files Browse the repository at this point in the history
- Removed directories for HighchartsStExtensions and HighchartsStPharoExtensions
- Updated Usage Examples
  • Loading branch information
mtabacman committed Jun 3, 2020
1 parent d68b9ad commit ee28ff0
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 808 deletions.
47 changes: 4 additions & 43 deletions docs/UsageExamples.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,8 @@
# Usage Examples

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:
After you load the *HighchartsStExamples* and *HighstockStExamples* packages, demo applications will be installed and initialized, so you can explore how to create charts using HighchartsSt.

```smalltalk
yourApp
addLibrary: JQDevelopmentLibrary;
addLibrary: Highcharts8OnlineLibrary.
```

Then you can render a basic chart like this:

```smalltalk
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:
The only step required to access the examples is to start your Seaside adaptors, for example like this:

```smalltalk
(ZnZincServerAdaptor port: 9999)
Expand All @@ -52,3 +11,5 @@ The default installation of Highcharts includes some examples. You can start you
```

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

You can check how the charts are built by browing *HighchartsDemo* and *HighstockDemo*.
113 changes: 0 additions & 113 deletions source/HighchartsStExtensions/ChartDatum.class.st

This file was deleted.

128 changes: 0 additions & 128 deletions source/HighchartsStExtensions/ChartSeries.class.st

This file was deleted.

69 changes: 0 additions & 69 deletions source/HighchartsStExtensions/HighchartsColorGradient.class.st

This file was deleted.

Loading

0 comments on commit ee28ff0

Please sign in to comment.