How to Set Sencha Touch Chart Legend Labels

Size
2,322 Kb
Views
16,192

How do I make an how to set sencha touch chart legend labels?

It's a common problem people ask about in the forums and it's got a really simple solution. Article on this will be at http://www.phs4j.com/2014/10/set-sencha-touch-chart-legend-labels/. What is a how to set sencha touch chart legend labels? How do you make a how to set sencha touch chart legend labels? This script and codes were developed by Shayne Trosdahl on 18 November 2022, Friday.

How to Set Sencha Touch Chart Legend Labels Previews

How to Set Sencha Touch Chart Legend Labels - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>How to Set Sencha Touch Chart Legend Labels</title>
</head>
<body> <script type="text/javascript" src="http://cdn.sencha.io/touch/sencha-touch-2.3.1/sencha-touch-all.js"></script>
<link href="http://cdn.sencha.io/touch/sencha-touch-2.3.1/resources/css/sencha-touch.css" rel="stylesheet" type="text/css"> <script src="js/index.js"></script>
</body>
</html>

How to Set Sencha Touch Chart Legend Labels - Script Codes JS Codes

Ext.application({ name: 'Chart Legend Custom Label Name', launch: function() { var barChart = new Ext.chart.Chart({ store: { fields: [ 'name', 'custSales', 'grossProfit' ], data: [{ 'name': 'Company one', 'custSales': 33, 'grossProfit': 2 }, { 'name': 'Company two', 'custSales': 10, 'grossProfit': 5 }, { 'name': 'Company three', 'custSales': 60, 'grossProfit': 2 }, { 'name': 'Company four', 'custSales': 20, 'grossProfit': 6 }, { 'name': 'Company five', 'custSales': 30, 'grossProfit': 4 }, { 'name': 'Company six', 'custSales': 12, 'grossProfit': 7 }, { 'name': 'Company seven', 'custSales': 80, 'grossProfit': 6 }, { 'name': 'Company eight', 'custSales': 20, 'grossProfit': 9 }, { 'name': 'Company nine', 'custSales': 15, 'grossProfit': 2 }, { 'name': 'Company ten', 'custSales': 55, 'grossProfit': 5 }] }, innerPadding : 10, insetPadding : 50, background : 'rgba(064, 064, 064, 1)', animate : true, shadow : true, // ======================================= // Add the legend... // ======================================= legend: { position : 'right' }, axes: [{ type : 'numeric', position : 'left', fields : [ 'custSales', 'grossProfit' ], label : { fontSize: 12, color: 'rgba(255, 255, 255, .2)', rotate: { degrees : -45 } }, style : { stroke: 'rgba(255, 255, 255, .2)', lineCap: 'miter', lineWidth: 2, miterLimit : 20 } }, { type : 'category', fields : 'name', label : { fontSize: 12, color: 'rgba(255, 255, 255, .2)', rotate: { degrees: -45 } }, style : { stroke: 'rgba(255, 255, 255, .2)' } }], series: [{ type : 'bar', stacked : true, // ============================================== // The title line below makes all the difference // title: [ 'Whatever', 'You', 'Want' ] // sets the chart legend labels // ============================================== title : ['Profit $', 'Sales $'], xField : [ 'name' ], yField : [ 'custSales', 'grossProfit' ], colors : [ 'rgba(148, 183, 187, 1)', 'rgba(239, 066, 111, 1)' ] }] }); Ext.Viewport.setLayout('fit'); Ext.Viewport.add(barChart); }
});
How to Set Sencha Touch Chart Legend Labels - Script Codes
How to Set Sencha Touch Chart Legend Labels - Script Codes
Home Page Home
Developer Shayne Trosdahl
Username Trozdol
Uploaded November 18, 2022
Rating 3
Size 2,322 Kb
Views 16,192
Do you need developer help for How to Set Sencha Touch Chart Legend Labels?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Shayne Trosdahl (Trozdol) Script Codes
Create amazing web content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!