JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<body>
<div id="titleBar">
<div id="unlname" class="header-info"></div>
<div id="center" class="x-hide-display"></div>
<div id="center1" class="x-hide-display"></div>
<div id="profileChart" class="chart"></div>
</div>
</body>
CSS
/*!
* Ext JS Library 3.2.1
* Copyright(c) 2006-2010 Ext JS, Inc.
* [email protected]
*
* http://www.extjs.com/license
*/
html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, th, td {
margin: 0;
padding: 0;
}
A:link {
text-decoration: none;
color: #000
}
A:visited {
text-decoration: none;
color: #000
}
A:active {
text-decoration: none;
color: #000
}
A:hover {
text-decoration: none;
color: #000
}
-moz-focus-inner {
border: 0;
}
img, body, html {
border: 0;
}
no- address, caption, cite, code, dfn, em, strong, th, var {
font-style: normal;
font-weight: normal;
}
ol, ul {
list-style: none;
}
caption, th {
text-align: left;
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%;
}
q:before, q:after {
content:'';
}
.ext-el-mask {
z-index: 100;
position: absolute;
top: 0;
left: 0;
-moz-opacity: 0.3;
opacity: .90;
filter: alpha(opacity=50);
width: 100%;
height: 100%;
}
.ext-el-mask-msg {
z-index: 20001;
position: absolute;
top: 0;
left: 0;
border: 1px solid;
background: repeat-x 0 -16px;
padding: 2px;
}
.ext-el-mask-msg div {
padding: 5px 10px 5px 10px;
border: 1px solid;
cursor: wait;
}
.ext-shim {
position: absolute;
visibility: hidden;
left: 0;
top: 0;
overflow: hidden;
}
.ext-ie .ext-shim {
filter: alpha(opacity=0);
}
.ext-ie6 .ext-shim {
margin-left: 5px;
margin-top: 3px;
}
.x-mask-loading div {
padding: 5px 10px 5px 25px;
background: no-repeat 5px 5px;
line-height: 16px;
}
/* class for hiding elements without using display:none */
.x-hidden, .x-hide-offsets {
position: absolute !important;
left: -10000px;
top: -10000px;
visibility: hidden;
}
.x-hide-display {
display: none !important;
}
.x-hide-visibility {
visibility: hidden !important;
}
.x-masked {
overflow: hidden...
JavaScript
Ext.onReady(function () {
var pbmodeData = [
['1', 'test'],
['2', 'test1']
];
var profileComboStore = new Ext.data.ArrayStore({
fields: [{
name: 'profileId'
}, {
name: 'profileName'
}],
data: pbmodeData
});
var chart = null;
function testStepCanvasJS() {
console.log("Inisde new can vas js");
//chart.render();
var conteEl = "profileChart";
var mainChartPanel = Ext.getCmp('chart-profile-panel');
var chartPanel = new Ext.Panel({
id: 'profile-chart',
//contentEl: conteEl,
contentEl: 'profileChart',
//layout: 'fit',
height: 400,
//top: 300,
html: chart,
autoScroll: true
});
mainChartPanel.removeAll();
mainChartPanel.add(chartPanel);
mainChartPanel.doLayout();
chart = new CanvasJS.Chart("profileChart", {
height: 360,
title: {
text: "Multi-Series StepLine Chart"
},
axisY: {
includeZero: false,
labelFontColor: "#369EAD",
lineColor: "#369EAD",
title: 'Test 1',
lineThickness: 3
},
toolTip: {
shared: true
},
axisY2: {
includeZero: false,
labelFontColor: "#C24642",
lineColor: "#C24642",
title: 'Test 2',
lineThickness: 3
},
axisX: {
lineThickness: 3,
gridThickness: 0,
gridColor: '#FFFFFF'
},
data: [{
type: "stepLine",
lineThickness: 3,
showInLegend: true,
name: 'Test Data 1',
dataPoints: [
{
...