Anyone who can write an APL function should be able to host it on the web.™
Rendered webpage |
APL code |
:Class dimpleSimple : MiPageSample
⍝ Control:: _JS.dimple
⍝ Description:: Dimple line plot chart
∇ Compose
:Access Public
Add _.dimple ScriptFollows
⍝ var svg = dimple.newSvg("#contentblock", 590, 400);
⍝ var data = [
⍝ { "Brand":"Coolio", "Region":"Hipsville", "Sales Volume":1000 },
⍝ { "Brand":"Uncoolio", "Region":"Hipsville", "Sales Volume":500 },
⍝ { "Brand":"Coolio", "Region":"Dullsville", "Sales Volume":100 },
⍝ { "Brand":"Uncoolio", "Region":"Dullsville", "Sales Volume":2000 }
⍝];
⍝ var myChart = new dimple.chart(svg, data);
⍝ myChart.setBounds(60, 30, 505, 305);
⍝ var x = myChart.addCategoryAxis("x", "Month");
⍝ x.addOrderRule("Date");
⍝ myChart.addMeasureAxis("y", "Unit Sales");
⍝ var s = myChart.addSeries(null, dimple.plot.line);
⍝ s.interpolation = "step";
⍝ myChart.draw();
∇
:EndClass