Skip to content

Instantly share code, notes, and snippets.

View IGx89's full-sized avatar

Matthew Lieder IGx89

View GitHub Profile
@IGx89
IGx89 / android_prefs
Created April 15, 2011 16:01
Emulates the standard Android preferences grid
// 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 {
@IGx89
IGx89 / chart_test.html
Last active March 18, 2019 17:27
Chart.js test
<html>
<body>
<canvas id="myChart" width="400" height="400"></canvas>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0/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'],