This file contains 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
<script type="text/javascript" charset="utf-8"> | |
// Global Properties for Line Chart Viz | |
var chartHeight = 400 | |
var chartWidth = 600 | |
var lineWidth = 3 | |
var chartAreaWidth = "60%" | |
var chartAreaLeft = "10%" | |
var xAxisLabelAngle = "45%" | |
This file contains 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
<script type="text/javascript" charset="utf-8"> | |
// Global Properties for Line Chart Viz | |
var chartHeight = 400 | |
var chartWidth = 600 | |
var lineWidth = 3 | |
var chartAreaWidth = "60%" | |
var chartAreaLeft = "10%" | |
var xAxisLabelAngle = "45%" | |
This file contains 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
# -*- coding: utf-8 -*- | |
import requests, json | |
master_key = 'your_keen_master_key' | |
def get_events(): | |
return requests.get("https://api.keen.io/3.0/projects?api_key=your_keen_master_key").json() | |
def del_events(): |
This file contains 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
Keen.onChartsReady(function(){ | |
//Create a Metric containing our total number of logins. | |
var myMetric = new Keen.Metric("logins", { | |
analysisType: "count" | |
}); | |
//Create a Metric containing our total number of registers. | |
var myMetric2 = new Keen.Metric("registers", { | |
analysisType: "count" |
This file contains 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
Keen.onChartsReady(function(){ | |
var loginsPreviousWeek = new Keen.Series("logins", { | |
analysisType: "count", | |
timeframe: "previous_7_days", | |
interval: "daily" | |
}); | |
//Get the result of the query and add the results cumulatively. | |
loginsPreviousWeek.getResponse(function(response){ |
This file contains 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
First way uses display: inline-block | |
<style> | |
/* required to remove arbitrary whitespace | |
* between child elements that are inline-block | |
*/ | |
.dashboard { | |
font-size: 0px; | |
} | |
.number { | |
display: inline-block; |