Commit 576bd481 authored by winai buttasart's avatar winai buttasart

ส่งงาน desktop application

parent 0ceeaec2
......@@ -3,64 +3,176 @@
<head>
<meta charset="UTF-8">
<script>
window.onload = function () {
<title>แก้ไข Animated chart</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
var chart = new CanvasJS.Chart("chartContainer", {
theme: "light2", // "light1", "light2", "dark1", "dark2"
exportEnabled: true,
animationEnabled: true,
title: {
text: "Desktop Browser Market Share in 2016"
},
data: [{
type: "pie",
startAngle: 25,
toolTipContent: "<b>{label}</b>: {y}%",
showInLegend: "true",
legendText: "{label}",
indexLabelFontSize: 16,
indexLabel: "{label} - {y}%",
dataPoints: [{
<!-- Favicons
================================================== -->
<link rel="icon" href="../../../img/icon/icon.png">
<style>
table {
width: 100%;
height: 100%;
padding-top: 20px;
/* margin-left: 20px; */
}
#editTD {
width: 30%;
height: 100%;
}
#showTD {
width: 60%;
height: 100%;
}
#paddingLTD {
width: 5%;
height: 100%;
}
#paddingRTD {
width: 5%;
height: 100%;
}
showDiv {
width: 100%;
height: 100%;
margin-right: 20px;
}
td {
border: 1px;
border-style: hidden;
border-spacing: 0px;
padding: 0px;
}
</style>
</head>
<body>
<table>
<tr>
<td id="paddingLTD"></td>
<td id="editTD">
<div id="divTD">
<h3>ชื่อกราฟ :
<textarea form="tArea" id="graphName"></textarea>
</h3>
</div>
<button id="bt1">บันทึก</button>
</td>
<td id="showTD">
<div id="showDiv"></div>
</td>
<td id="paddingRTD"></td>
</tr>
</table>
<script src="../../../asset/js/canvasjs/canvasjs.min.js"></script>
<script src="../../../asset/js/jquery/jquery.min.js"></script>
<script>
var data = [{
y: 51.08,
label: "Chrome"
},
{
y: 27.34,
label: "Internet Explorer"
},
{
}, {
y: 10.62,
label: "Firefox"
},
{
}, {
y: 5.02,
label: "Microsoft Edge"
},
{
}, {
y: 4.07,
label: "Safari"
},
{
}, {
y: 1.22,
label: "Opera"
},
{
}, {
y: 0.44,
label: "Others"
}
]
];
var nameG = "Desktop Browser Market Share in 2016";
$('#graphName').val(nameG);
for (var i in data) {
$('#divTD').append("<div><h3>" + "<input type='text' class='te' value='" + data[i].label + "' size='10'>" +
" : <input type='text' value='" + data[i].y + "' size='2'> %</h3></div>");
// <button>ลบ</button>
}
window.onload = function () {
Render();
}
$(document).ready(function () {
$('#graphName').mouseout(function () {
nameG = $('#graphName').val();
Render();
});
$('#bt1').click(function () {
Redata();
});
// $('button').click(function () {
// $(this).parent().remove();
// Redata();
// });
function Redata() {
var a = $('input');
for (var i = 0; i < a.length; i += 2) {
data[i / 2].label = a[i].value;
i++;
data[(i - 1) / 2].y = a[i].value;
i--;
Render();
}
}
});
function Render() {
var chart = new CanvasJS.Chart("showDiv", {
theme: "light2", // "light1", "light2", "dark1", "dark2"
exportEnabled: true,
animationEnabled: true,
title: {
text: nameG
},
data: [{
type: "pie",
startAngle: 25,
toolTipContent: "<b>{label}</b>: {y}%",
showInLegend: "true",
legendText: "{label}",
indexLabelFontSize: 16,
indexLabel: "{label} - {y}%",
dataPoints: data
}]
});
chart.render();
}
</script>
</head>
<body>
<div id="chartContainer" style="height: 370px; max-width: 920px; margin: 0px auto;"></div>
<script src="../../asset/js/canvasjs/canvasjs.min.js"></script>
</body>
</html>
\ No newline at end of file
<body>
<script>
window.onload = function () {
var chart = new CanvasJS.Chart("show", {
theme: "light2", // "light1", "light2", "dark1", "dark2"
exportEnabled: true,
animationEnabled: true,
title: {
text: "Desktop Browser Market Share in 2016"
},
data: [{
type: "pie",
startAngle: 25,
toolTipContent: "<b>{label}</b>: {y}%",
showInLegend: "true",
legendText: "{label}",
indexLabelFontSize: 16,
indexLabel: "{label} - {y}%",
dataPoints: [{
y: 51.08,
label: "Chrome"
},
{
y: 27.34,
label: "Internet Explorer"
},
{
y: 10.62,
label: "Firefox"
},
{
y: 5.02,
label: "Microsoft Edge"
},
{
y: 4.07,
label: "Safari"
},
{
y: 1.22,
label: "Opera"
},
{
y: 0.44,
label: "Others"
}
]
}]
});
chart.render();
}
</script>
</body>
\ No newline at end of file
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......@@ -146,7 +154,7 @@
<img src="../asset/image/icon/files.png" alt="..." class="preview">
</button>
<button type="button" class="btn btn-success btnCreate" data-toggle="tooltip" title="สร้างกราฟ" style="margin-left:10px;"
onclick="editChart('./customChart/mainCustom.html','./customeChart/editChart.html','./customeChart/showChart.html')">
onclick="ChartEdit('./customChart/01/01.html')">
<img src="../asset/image/icon/create.png" alt="..." class="preview">
</button>
<br>
......@@ -461,6 +469,15 @@
<script src="../asset/bootstrap/js/bootstrap.bundle.min.js"></script>
<script>
function ChartEdit(path) {
var win = window.open(path, '_blank');
if (win) {
win.focus();
} else {
alert('อนุญาติให้เปิดเว็บไซต์');
}
}
function previewShow(path) {
var win = window.open(path, '_blank');
if (win) {
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......@@ -146,7 +154,7 @@
<img src="../asset/image/icon/files.png" alt="..." class="preview">
</button>
<button type="button" class="btn btn-success btnCreate" data-toggle="tooltip" title="สร้างกราฟ" style="margin-left:10px;"
onclick="editChart('./customChart/mainCustom.html','./customeChart/editChart.html','./customeChart/showChart.html')">
onclick="ChartEdit('./customChart/01/01.html')">
<img src="../asset/image/icon/create.png" alt="..." class="preview">
</button>
<br>
......@@ -461,6 +469,15 @@
<script src="../asset/bootstrap/js/bootstrap.bundle.min.js"></script>
<script>
function ChartEdit(path) {
var win = window.open(path, '_blank');
if (win) {
win.focus();
} else {
alert('อนุญาติให้เปิดเว็บไซต์');
}
}
function previewShow(path) {
var win = window.open(path, '_blank');
if (win) {
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="../img/icon/icon.png">
<link href="../asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../asset/css/round-about.css">
<style>
......
......@@ -4,6 +4,14 @@
<head>
<meta charset="UTF-8">
<title>ออกแบบกราฟของคุณ</title>
<meta name="description" content="เว็บไซต์แนะนำเกี่ยวกับนายวินัย บุตรศาสตร์">
<meta name="keywords" content="Nize portfolio template">
<meta name="author" content="Nize">
<!-- Favicons
================================================== -->
<link rel="icon" href="./img/icon/icon.png">
<link href="./asset/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="./asset/css/round-about.css">
<style>
......@@ -152,7 +160,7 @@
<img src="./asset/image/icon/files.png" alt="..." class="preview">
</button>
<button type="button" class="btn btn-success btnCreate" data-toggle="tooltip" title="สร้างกราฟ" style="margin-left:10px;"
onclick="editChart('./customChart/mainCustom.html','./customeChart/editChart.html','./customeChart/showChart.html')">
onclick="ChartEdit('./chartMenu/customChart/01/01.html')">
<img src="./asset/image/icon/create.png" alt="..." class="preview">
</button>
<br>
......@@ -469,6 +477,15 @@
<script src="./asset/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- <script src="./asset/js/canvasjs/canvasjs.min.js"></script> -->
<script>
function ChartEdit(path) {
var win = window.open(path, '_blank');
if (win) {
win.focus();
} else {
alert('อนุญาติให้เปิดเว็บไซต์');
}
}
function previewShow(path) {
var win = window.open(path, '_blank');
if (win) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment