CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 22:01:39 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"1fd4e47e9edb82ae9f2234f54330cd28"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=7G9KvOZSfZ%2FJ%2B3PRsGW8ZGvafW9zaemnhdy0pau%2BaMHdlo8wsJbfIuowVlBu4IksRWVZgwVlHuAhfwnDp7u%2FTOO8o2UsxMHKPZEatMsj9v67QPeez1qtveSazZ0mYnA1nk7%2BGduBr34E24c1ylwpnTKMn7uvle6vOaCrZ6zeBtquNQvSE875LFhXln1Av72TNjvXubeiDyzcj4XaZB3%2BWYPwfEGYDt5m9ujEWM324O%2BzZNSuiMPOjsV6nOyIij3yI2T2BvTZF%2FiNtZeCGZ7ZDg%3D%3D--oq5q%2FvyrYoB%2Fsnj7--Z4SAIz7r4X7SXN9lo84kxA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.595415044.1753394498; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 22:01:38 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 22:01:38 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: B154:F9CD0:6D87:A689:6882AD42
New ways for creating DataTables for Lavacharts · GitHub
Show Gist options
Save kevinkhill/0c7c5f6211c7fd8f9658 to your computer and use it in GitHub Desktop.
{{ message }}
Instantly share code, notes, and snippets.
Last active
January 7, 2019 18:55
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save kevinkhill/0c7c5f6211c7fd8f9658 to your computer and use it in GitHub Desktop.
New ways for creating DataTables for Lavacharts
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
<?php | |
use \Khill\Lavacharts\DataTables\DataFactory; | |
// Underneath the DataFactory, this is just a shortcut to calling | |
// addColumns then addRows | |
$data = DataFactory::DataTable([ | |
['string', 'name'], | |
['number', 'donuts'] | |
],[ | |
['Jim', 4], | |
['Tom', 3], | |
['Mary', 2], | |
['Gary', 3], | |
['Larry', 1] | |
]); | |
// Taken straight from Google's example for BubbleCharts | |
// The method will assign colmun types based on the data from | |
// the rows (currently only strings and numbers) | |
$data = DataFactory::arrayToDataTable([ | |
['ID', 'Life Expectancy', 'Fertility Rate', 'Region', 'Population'], | |
['CAN', 80.66, 1.67, 'North America', 33739900], | |
['DEU', 79.84, 1.36, 'Europe', 81902307], | |
['DNK', 78.6, 1.84, 'Europe', 5523095], | |
['EGY', 72.73, 2.78, 'Middle East', 79716203], | |
['GBR', 80.05, 2, 'Europe', 61801570], | |
['IRN', 72.49, 1.7, 'Middle East', 73137148], | |
['IRQ', 68.09, 4.77, 'Middle East', 31090763], | |
['ISR', 81.55, 2.96, 'Middle East', 7485600], | |
['RUS', 68.6, 1.54, 'Europe', 141850000], | |
['USA', 78.09, 2.05, 'North America', 307007000] | |
]); | |
// Excluding a header row and passing true as the second | |
// parameter will treat all rows as data. | |
$data = DataFactory::arrayToDataTable([ | |
['Mon', 20, 28, 38, 45], | |
['Tue', 31, 38, 55, 66], | |
['Wed', 50, 55, 77, 80], | |
['Thu', 77, 77, 66, 50], | |
['Fri', 68, 66, 22, 15] | |
// Treat first row as data as well. | |
], true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can’t perform that action at this time.