-
Notifications
You must be signed in to change notification settings - Fork 3
/
style.html
126 lines (124 loc) · 4.71 KB
/
style.html
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Wijmo Example Page</title>
<link href="http://cdn.wijmo.com/themes/aristo/jquery-wijmo.css" rel="stylesheet" type="text/css" />
<link href="http://cdn.wijmo.com/jquery.wijmo-open.1.5.0.css" rel="stylesheet" type="text/css" />
<link href="http://cdn.wijmo.com/jquery.wijmo-complete.1.5.0.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
<script src="http://cdn.wijmo.com/external/jquery.bgiframe-2.1.3-pre.js" type="text/javascript"></script>
<script src="http://cdn.wijmo.com/external/globalize.min.js" type="text/javascript"></script>
<script src="http://cdn.wijmo.com/external/jquery.mousewheel.min.js" type="text/javascript"></script>
<script src="http://cdn.wijmo.com/external/raphael.js" type="text/javascript"></script>
<script src="http://cdn.wijmo.com/jquery.wijmo-open.1.5.0.min.js" type="text/javascript"></script>
<script src="http://cdn.wijmo.com/jquery.wijmo-complete.1.5.0.min.js" type="text/javascript"></script>
<script src="http://cdn.mmcreation.com/javascript/jquery.colorpicker/colorpicker.js" type="text/javascript"></script>
<link href="http://cdn.mmcreation.com/javascript/jquery.colorpicker/css/colorpicker.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//demo page script
var stylomatic = {};
function getStyle() {
stylomatic = {
fill: "#" + $("#fill").val(),
stroke: "#" + $("#stroke").val(),
"stroke-width": $("#strokesize").val(),
opacity: 0.8
}
}
$(document).ready(function () {
getStyle();
$("input").change(function () {
getStyle();
$("#chart").wijbarchart("option", "seriesStyles", [stylomatic]);
});
$('#fill').ColorPicker({
onChange: function (hsb, hex, rgb) {
$('#fill').val(hex).trigger("change");
},
onBeforeShow: function () {
$(this).ColorPickerSetColor(this.value);
}
}).wijtextbox();
$('#stroke').ColorPicker({
onChange: function (hsb, hex, rgb) {
$('#stroke').val(hex).trigger("change");
},
onBeforeShow: function () {
$(this).ColorPickerSetColor(this.value);
}
}).wijtextbox();
$("#strokesize").wijslider({
min: 0.5,
max: 10,
change: function (event, ui) {
$("#strokesize").val(ui.value).trigger("change");
}
});
$("#chart").wijbarchart({
hint: {
content: function () {
return this.x + '\n ' + this.y + '';
}
},
animation: {
enabled: false
},
seriesTransition: {
enabled: false
},
header: {
text: "Browser Wars"
},
seriesList: [{
label: "Browsers",
legendEntry: false,
data: { x: ['IE', 'Firefox', 'Chrome'], y: [44.94, 30.06, 17.47] }
}],
seriesStyles: [stylomatic],
seriesHoverStyles: [{
opacity: 1
}]
});
});
</script>
<style type="text/css">
body
{
font-size: 80%;
}
#container
{
width: 960px;
margin: 0 auto;
}
#chart
{
width: 800px;
height: 400px;
}
.wijmo-wijslider-horizontal
{
display: inline-block;
}
</style>
</head>
<body>
<div id="container">
<div id="chart" class="ui-widget ui-widget-content ui-corner-all">
</div>
<fieldset class="ui-widget">
<legend>Chart Style </legend>
<div>
<label>
Fill<input id="fill" type="text" value="8ede43" /></label>
<label>
Stroke<input id="stroke" type="text" value="8ede43" /></label>
<label>
Stroke-size<input id="strokesize" type="text" value="1.5" /></label>
</div>
</fieldset>
</div>
</body>
</html>