36f11711
mwasiluk
d3 scatterplot-da...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<link rel="import" href="../base-ajax-json-alasql-datalet/base-ajax-json-alasql-datalet.html">
<dom-module id="scatterplot-datalet">
<template>
<div id="scatterplot-placeholder"></div>
<base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></base-ajax-json-alasql-datalet>
</template>
<script src="../shared_js/d3.js"></script>
<script>
var ScatterplotBehavior = {
};
ScatterplotDatalet = Polymer({
is: 'scatterplot-datalet',
properties: {
xAxisLabel: {
type: String,
value: ""
},
yAxisLabel: {
type: String,
value: ""
},
behavior : {
type : Object,
value : {}
},
/**
* Control the export menu
* xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
*
* @attribute export_menu
* @type Number
* @default 15
*/
export_menu : {
type : Number,
value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
}
},
/**
* 'ready' callback extend the scatterchartComponentBehavior with HighchartsComponentBehavior and scatterchartBehavior
* and run the Datalet workcycle.
*
* @method ready
*/
ready: function(){
this.behavior = $.extend(true, {}, BaseDataletBehavior, WorkcycleBehavior, AjaxJsonAlasqlBehavior, ScatterplotBehavior);
this.async(function(){this.behavior.init(this)},0);
}
});
</script>
</dom-module>
|