Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var chartDataStore = Ext.create("Ext.data.ArrayStore", {
- storeId: "chartData",
- fields: ['question', 'interviewer', 'employee' ],
- data: [
- ["erti",6,7],
- ["ori",7,4],
- ["sami",3,6],
- ["otxi",1,9],
- ["xuti",6,8],
- ["eqvsi",6,4],
- ["shvidi",7,3],
- ["rva",3,2]
- ]
- });
- Ext.create({
- xtype: 'chart',
- width: '100%',
- height: 410,
- padding: '10 0 0 0',
- renderTo: document.body,
- animate: true,
- shadow: true,
- style: 'background: #fff;',
- legend: {
- docked: 'right',
- border: 0,
- margin: 0,
- labelFont: '12px Helvetica'
- },
- store: chartDataStore,
- insetPadding: 40,
- axes: [{
- type: 'numeric',
- fields: ['interviewer', 'employee' ],
- position: 'left',
- maximum:9,
- grid: true,
- minimum: 0,
- minorTickSteps: 1
- }, {
- type: 'category',
- fields: 'question',
- position: 'bottom',
- grid: true,
- label: {
- rotate: {
- degrees: -45
- }
- }
- }],
- series: [{
- type: "line",
- axis: "left",
- xField: "question",
- yField: "interviewer",
- title: "Interviewer",
- marker: true,
- style: {
- 'stroke-width': 4
- },
- markerConfig: {
- type: 'circle',
- radius: 4,
- fill: '#fff'
- },
- highlight: {
- fill: '#000',
- radius: 5,
- 'stroke-width': 2,
- stroke: '#fff'
- },
- tips:{
- trackMouse: true,
- style: 'background: #FFF',
- height: 20,
- renderer: function(storeItem, item) {
- var title = item.series.title;
- this.setTitle(title + ' for ' + storeItem.get('employee') + ': ' + storeItem.get('interviewer') + storeItem.get('question'));
- }
- }
- }, {
- type: "line",
- axis: "left",
- xField: "question",
- yField: "employee",
- title: "Employee",
- marker: true,
- style: {
- 'stroke-width': 4
- },
- markerConfig: {
- type: 'circle',
- radius: 4,
- fill: '#fff'
- },
- highlight: {
- fill: '#000',
- radius: 5,
- 'stroke-width': 2,
- stroke: '#fff'
- },
- tips: {
- trackMouse: true,
- style: 'background: #FFF',
- height: 20,
- renderer: function(storeItem, item) {
- var title = item.series.title;
- this.setTitle(title + ' for ' + storeItem.get('employee') + ': ' + storeItem.get('interviewer') + storeItem.get('question'));
- }
- }
- }]
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement