This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj = { | |
fooVal: 'this is the value of foo', | |
get foo() { | |
return this.fooVal; | |
}, | |
set foo(val) { | |
this.fooVal = val; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Overwrite prevention */ | |
var obj = { | |
foo: 'this is the value of foo' | |
}; | |
Object.defineProperties(obj, { | |
'getFoo': { | |
value: function () { | |
return this.foo; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj = { | |
n: 67, | |
get id() { | |
return 'The ID is: ' + this.n; | |
}, | |
set id(val) { | |
if (typeof val === 'number') | |
this.n = val; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = new WHS.App([ | |
new WHS.app.ElementModule(), // attach to DOM | |
new WHS.app.SceneModule(), // creates THREE.Scene instance | |
new WHS.app.CameraModule(), // creates PerspectiveCamera instance | |
new WHS.app.RenderingModule() // creates WebGLRenderer instance | |
]); | |
app.start(); // run animation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="https://cdn.rawgit.com/tiaanduplessis/wenk/master/dist/wenk.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- example of Wenk tooltip appearing on the right --> | |
<span data-wenk="I'm to the right!" data-wenk-pos="right"> | |
Wenk to the right! | |
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="table"> | |
<div class="heading"> | |
<div class="cell"> | |
<p>Date</p> | |
</div> | |
... | |
</div> | |
<div class="row"> | |
<div class="cell"> | |
<p>01/01</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anychart.onDocumentLoad(function() { | |
// create a chart and set the data | |
var chart = anychart.column(); | |
var tableData = anychart.data.parseHtmlTable( | |
".table", ".row", ".cell p", ".heading .cell p", ".title" | |
); | |
chart.data(tableData); | |
chart.legend(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anychart.onDocumentReady(function() { | |
// JSON data | |
var json = { | |
"chart": { | |
"type": "column", | |
"title": "AnyChart: Data from JSON", | |
"series": [{ | |
"seriesType": "Spline", | |
"data": [ | |
{"x": "P1", "value": "128.14"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anychart.onDocumentReady(function() { | |
// XML settings and data | |
var xml = '<?xml version="1.0" encoding="utf-8"?>' + | |
'<anychart xmlns="https://cdn.anychart.com/schemas/latest/xml-schema.xsd">' + | |
'<chart type="polar" container="container">' + | |
'<series_list>'+ | |
'<series series_type="area">' + | |
'<data>' + | |
'<point x="0" value="0"/>'+ | |
'<point x="50" value="100"/>'+ |