Skip to content

Instantly share code, notes, and snippets.

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
<?php do_action( 'amp_post_template_head', $this ); ?>
<style amp-custom>
<?php $this->load_parts( array( 'style' ) ); ?>
<?php do_action( 'amp_post_template_css', $this ); ?>
</style>
</head>
<script src="https://hammerjs.github.io/dist/hammer.js"></script>
@webloglife
webloglife / gist:9841601587c3a034d280a8fa4ba26879
Created November 5, 2016 02:16
折れ線グラフ(2軸)
<canvas id="myChart4" width="400" height="250"></canvas>
<script>
var config = {
type: 'line',
data: {
labels: ['8/1','8/2','8/3','8/4','8/5','8/6','8/7','8/8','8/9','8/10','8/11','8/12','8/13','8/14','8/15'],
datasets: [
{
label: "Yahoo",
<canvas id="myChart3" width="150" height="150"></canvas>
<script>
var config = {
type: 'pie',
data: {
datasets: [{
data: [
86.8,
13.2
],
<canvas id="myChart2" width="400" height="250"></canvas>
<script>
var ctx = document.getElementById("myChart2");
var data = {
labels: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],
datasets: [
{
label: "ページビュー",
fill: false,
lineTension: 0.1,
<canvas id="myChart1" width="400" height="250"></canvas>
<script>
var ctx = document.getElementById("myChart1");
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ["1月", "2月", "3月", "4月", "5月", "6月"],
datasets: [{
label: 'PV数',
data: [35000, 39500, 103400, 115000, 132851, 183183],
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.bundle.js"></script>
<?php
class Hoge(){
function __construct(){
print "Hello World!";
}
}
?>