<html>
<head>
<title>Javscript Flow Chart in FusionCharts</title>
<!--
Include fusioncharts core library -->
<script type="text/javascript" src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script>
<!--
Include fusion theme -->
<script type="text/javascript" src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.js"></script>
<script type="text/javascript">
const dataSource = {
chart: {
caption: "Steps for Creating Flow
Chart in Html and Javascript",
yaxismaxvalue: "1100",
yaxisminvalue: "0",
theme: "fusion",
valuefontsize: "12",
viewmode: "1",
valuefontcolor: "#FFFFFF",
plotfillhovercolor: "#1A237E",
divlinealpha: "0"
},
dataset: [
{
data: [
{
id: "01",
x: "5",
y: "1000",
label: "start",
shape: "circle",
color: "#5D62B5",
radius: "20",
hovercolor: "#1A237E"
},
{
id: "02",
x: "5",
y: "800",
label: "Import FusionCharts {br}
library",
color: "#29C3BE",
shape: "rectangle",
width: "100",
height: "60"
},
{
id: "03",
x: "5",
y: "600",
label: "Import Fusion
{br}Themes",
color: "#29C3BE",
shape: "rectangle",
width: "100",
height: "60"
},
{
id: "04",
x: "5",
y: "350",
label: "Create div {br} HTML
body",
color: "#FFC533",
shape: "polygon",
radius: "60"
},
{
id: "05",
x: "5",
y: "100",
label: "Create charts key {br} in
DataSource JSON",
color: "#BC95DF",
shape: "rectangle",
width: "120",
height: "60"
},
{
id: "06",
x: "15",
y: "100",
label: "Create dataset key {br} in
DataSource JSON",
color: "#BC95DF",
shape: "rectangle",
width: "120",
height: "60"
},
{
id: "07",
x: "25",
y: "100",
label: "Create connectors key
{br} in DataSource JSON",
color: "#BC95DF",
shape: "rectangle",
width: "120",
height: "60"
},
{
id: "08",
x: "25",
y: "350",
label: "Write the Ready {br}
Function",
color: "#B30100",
shape: "rectangle",
width: "100",
height: "60"
},
{
id: "09",
x: "25",
y: "600",
label: "View in Browser",
color: "#FFC533",
shape: "polygon",
radius: "60",
},
{
id: "10",
x: "25",
y: "800",
label: "end",
color: "#5D62B5",
shape: "circle",
radius: "20",
} ]
}
],
connectors: [
{
connector: [
{
from: "01",
to: "02",
strength: "2",
arrowatstart: "0",
arrowatend: "1",
alpha: "50"
},
{
from: "02",
to: "03",
strength: "2",
arrowatstart: "0",
arrowatend: "1",
alpha: "50"
},
{
from: "03",
to: "04",
strength: "2",
arrowatstart: "0",
arrowatend: "1",
alpha: "50"
},
{
from: "04",
to: "05",
strength: "2",
arrowatstart: "0",
arrowatend: "1",
alpha: "50"
},
{
from: "05",
to: "06",
strength: "2",
arrowatstart: "0",
arrowatend: "1",
alpha: "50"
},
{
from: "06",
to: "07",
strength: "2",
arrowatstart: "0",
arrowatend: "1",
alpha: "50"
},
{
from: "07",
to: "08",
strength: "2",
arrowatstart: "0",
arrowatend: "1",
alpha: "50"
},
{
from: "08",
to: "09",
strength: "2",
arrowatstart: "0",
arrowatend: "1",
alpha: "50"
},
{
from: "09",
to: "10",
strength: "2",
arrowatstart: "0",
arrowatend: "1",
alpha: "50"
}
]
}
]
};
FusionCharts.ready(function() {
var myChart = new FusionCharts({
type: "dragnode",
renderAt: "flowchart-container",
width: "100%",
height: "100%",
dataFormat: "json",
dataSource
}).render();
});
</script>
</head>
<body>
<div
id="flowchart-container"></div>
</body>
</html>
|
No comments:
Post a Comment