New in 4.0 Colors plugin Default palette of Chart.js brand colors is available as a built-in time-saving zero-configuration plugin.

最近すっかりグラフ厨になってるんですが、ちょっとした解析ツールとかにグラフあったらいいなーなんて思う事ありますよね? webアプリで使うならjsでグラフ書けると色々使い勝手がいいんですけど、毎回どのライブラリがいいかなー?と悩む訳ですよ。Highcharts.jsは格好いいけど、商用利用は有料だし・・しかも結構高いし・・ そんな中、「これでFAで良いんじゃないの?」ってのがあったので紹介してみます。 dygraphs.jsといいます。他にも幾つかライブラリを試してみたんですが、これはかなりシンプルに書けるわりに、高機能だったのが良かった。なかなか書き方の参考になりそうなところ見つからなかったので、幾つかサンプル残しておこうと思います。 一番シンプルなグラフ こんな感じに書くだけです。データはCSV形式でシンプルな受け渡し。 <script type="text/javascript" sr
<script type="text/javascript" src="js/dygraph-combined.js"></script> <script type="text/javascript"> function plot(graphArea, fromX, toX, fn) { var graph = document.getElementById(graphArea); var width = parseInt(graph.style.width); var xs = 1.0 * (toX - fromX) / width; var data = []; for (var i = 0; i < width; i++) { var x = fromX + i * xs; var y = fn(x); var row = [x]; if (y.length > 0) { for (
A natural language detection library based on trigram statistical analysis for Node.js and the Web. Download .zip Download .tar.gz View on GitHub Try it out Usage You can clone this repo as follows: git clone git@github.com:richtr/guessLanguage.js.git You can use this library in a web page by including the following files: <script src="lib/_languageData.js"></script> <script src="lib/guessLanguage
8月15 JavaScript で書かれた ZLIB の伸張速度比較 はじめに 最近、Inflate 実装のチューニングを行うことが多かったので、現状でどの程度の速度が出ているか把握するため、他の実装と比較してみました。 比較に使用した ZLIB ライブラリ 今回の比較では、以下のライブラリの存在を確認しています。 uncompress.js に関しては、今回入手できなかったため比較対象からはずしています。 名前 Input Output 名前空間 ライセンス ファイルサイズ pdf.js Uint8Array, Array, ArrayBuffer(*) Uint8Array FlateStream, Stream, DecodeStream, etc... MIT stream.js: 80,349 zlib-js String String ZLIB zlib zlib-inflat
Moment.js 2.30.1 Parse, validate, manipulate, and display dates and times in JavaScript. Install npm install moment --save # npm yarn add moment # Yarn spm install moment --save # spm meteor add momentjs:moment # meteor bower install moment --save # bower (deprecated) Format Dates moment().format('MMMM Do YYYY, h:mm:ss a'); moment().format('dddd'); moment().format("MMM Do YY"); moment().format('YY
Each language, and the countries that speak that language, have different expectations when it comes to how numbers (including currency and percentages) and dates should appear. Obviously, each language has different names for the days of the week and the months of the year. But they also have different expectations for the structure of dates, such as what order the day, month and year are in. In
1.3 Table of Contents IntroductionDownload full source / minifiedExample usageFormat specifiersLocalisationAPI Documentation strftime demoChangeLogFAQFeedbackCopyright & Licence Introduction C and PHP developers have had access to a built in strftime function for a long time. This function is an easy way to format dates and times for various display needs. This library brings the flexibility of st
Date.W3CDTF クラスは、JavaScript ビルドインの Date オブジェクトを継承して、W3CDTF の入出力に対応します。 今回はテストスクリプトも書いて、初めて JSAN に登録してみました。 W3CDTF とは、RSS などで利用されている『yyyy-mm-ddThh:mm:ss+hh:mm』形式の日時フォーマットです。 複数の形式がありますが、Date.W3CDTF クラスでは以下の形式に対応しています。 2005-04-23T17:20:00+09:00 ⇒タイムゾーン指定あり 2005-04-23T17:20:00Z ⇒タイムゾーン指定なし 昨年書いた jse-date-w3cdtf.js はネイティブのDateオブジェクトを直接拡張するものでしたが、 今回の Date.W3CDTF クラスは、少し行儀良く継承するように書いています。 今回の Date.W3CD
HTML5 is an advanced version of the HTML language which supports audio-visual elements. This means when you use HTML5 to build your app or website, you will be able to run JavaScript as it supports it. It allows your websites or application to be more powerful and diverse. Canvas graphing is one of the major trends in the web design world today. With the use of HTML5, developers have been able to
どうもはじめまして、株式会社はてなのid:cho45です。これから数回に渡り、拙作のJavaScriptのライブラリであるJSDeferredの紹介と、それに関係するJavaScriptにおける非同期の技術に関して解説させていただきます。 JavaSciptにおける非同期処理 非同期処理とは まずは確認程度に、非同期処理がどういうものかを解説しておきます。先に乱暴にまとめてしまうと、以下の事柄が大切なところです。 非同期とは「あとで」という意味 同期処理はコードの見た目順に実行される/非同期ではそうならない JavaScript の非同期処理は絶対に同期処理にすることができない JavaScriptにおける非同期処理をいくつか例に出すと、以下のようなものが挙げられます。 リスト1 // XMLHttpRequest の例 var req = new XMLHttpRequest(); re
Table of Contents Collections each, map, inject, detect, select, reject, all, any, include, invoke, pluck, max, min, sortBy, sortedIndex, toArray, size Arrays first, last, compact, flatten, without, uniq, intersect, zip, indexOf Functions bind, bindAll, delay, defer, wrap Objects keys, values, extend, clone, isEqual, isElement, isArray, isFunction, isUndefined Utility uniqueId, template Collection
d3.js データのビジュアリゼーションに使えるJSライブラリ「d3.js」 ユニークで様々なビジュアリゼーションが可能になっており、更にアニメーションしたりインタラクティブな要素を盛り込めるのも特徴 次のようなデータビジュアリゼーションをjavascriptのコードを使って描画でき、サンプルコードなんかも公開されています。 IEには対応していませんが、かなり色々なことができるので覚えておいてもよいかも。 関連エントリ 色々と使えそうなグラフや図が描けるビジュアリゼーションライブラリ集 データの様々なヴィジュアリゼーションが可能なFlexライブラリ「birdeye」
先日予告したSNBinderのオープンソース化、GitHubに簡単なREADME付きでアップロードしたのでご覧いただきたい。 https://github.com/snakajima/SNBinder SNBinderは、ひと言で言えば「ブラウザー上でView(テンプレート)とData(JSON)を結合して HTML を生成するテンプレートエンジン」である。 90年の半ばから急速に広まったインターネット。サーバー側でダイナミックに生成したHTMLページをブラウザーで閲覧するだけ、というシンプルでエレガントなアーキテクチャゆえの成功だ。しかし、ブラウザーの高機能化に伴い、JavaScriptを駆使して使いやすさを向上しようという試みが色々なウェブサイトで行われている。GMail、Google Docs、Facebookなどは良い例だ。 その方向性を究極にまで突き詰めると、サーバー側は(MVC
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く