This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<canvas id="myChart" width="400" height="400"></canvas> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.js"></script> | |
<script> | |
var ctx = document.getElementById('myChart').getContext('2d'); | |
var myChart = new Chart(ctx, { | |
type: 'bar', | |
data: { | |
labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the following code is both the logic and examples of using it | |
var win = Titanium.UI.currentWindow; | |
// I've set anyDensity to true in my app and this function enables the UI to properly scale | |
// you can safely delete this function and all references to it if you'd like | |
var adj = function(pixels) { | |
if(Titanium.Platform.name == 'iPhone OS') { | |
return pixels; | |
} else { |