Giter Site home page Giter Site logo

Comments (7)

Shinsuke-Abe avatar Shinsuke-Abe commented on July 17, 2024

http://b.ruyaka.com/2010/11/30/open-flash-chart-on-rails%E3%81%A7%E3%82%B0%E3%83%A9%E3%83%95%E3%83%BB%E3%83%81%E3%83%A3%E3%83%BC%E3%83%88%E3%82%923%E5%88%86%E3%81%A7%E4%BD%9C%E6%88%90%E3%81%97%E3%82%88%E3%81%86/
http://d.hatena.ne.jp/chion_lab/20090812/p1
http://doruby.kbmj.com/nakahira_on_rails/20081021/ruby_on_rails_graph_open_flash_chart_

グラフは体重履歴のページにタブ表記で分けて行う。

from recordiet.

Shinsuke-Abe avatar Shinsuke-Abe commented on July 17, 2024

OpenFlashChartは4年くらい更新されてない感じなので、別の物を使う。

Googlechats:
http://t-taira.hatenablog.com/entry/20101123/1290519039
http://googlecharts.rubyforge.org/

from recordiet.

Shinsuke-Abe avatar Shinsuke-Abe commented on July 17, 2024

タブでの見せ方は下記。
Tabbable example
http://twitter.github.com/bootstrap/components.html#navs

from recordiet.

Shinsuke-Abe avatar Shinsuke-Abe commented on July 17, 2024

タブとグラフの実装は終わったので、リファクタリングをする。

from recordiet.

Shinsuke-Abe avatar Shinsuke-Abe commented on July 17, 2024

Y軸ラベル表示のアルゴリズムを決める。

(目標まで含めた最小値の小数点以下切り捨て)..(目標まで含めた最大値の小数点切り上げ)で1ずつ

ってか、含まれてるっぽい。
横軸の線がどうやったら引けるか。。。

from recordiet.

Shinsuke-Abe avatar Shinsuke-Abe commented on July 17, 2024

NGのパラメータ:
Chart?
chxl=0:|11%2f18|11%2f19|11%2f20|11%2f22|11%2f23|11%2f24|11%2f25 => x軸のラベル
&chxt=x => ラベルをx軸につける
&chco=3300ff,ff99cc => データラインの色
&chd=s:9999999,5555555 => データ <= s形式って何? <= データが正しくわたってない?
&chdl=%e4%bd%93%e9%87%8d|%e7%9b%ae%e6%a8%99 => データの適用
&cht=lc => チャートの種類
&chs=800x300 => チャートの大きさ
&chxr=0,73.2,73.2|1,67.5,67 => 各データのレンジ?

OKのパラメータ
Chart?
chxl=0:|11%2f22|11%2f23|11%2f25|11%2f26|11%2f27 => x軸のラベル
&chxt=x => ラベルをx軸につける
&chco=3300ff,ff99cc => データラインの色
&chd=s:29653,11111 => データ <= s形式って何?
&chdl=%e4%bd%93%e9%87%8d|%e7%9b%ae%e6%a8%99 => データの適用
&cht=lc => チャートの種類
&chs=800x300 => チャートの大きさ
&chxr=0,70.0,79.0|1,68.0,68 => 各データのレンジ?

GChartはデフォルトでdata部をs形式で生成するっぽい
:encoding =>hogeで変更可能
simple_encodingはintegerの0-61の範囲でのみ有効
basic_text_formatは小数点の0-100まで
chds=aとしてスケールするようにすればOK
だけど、GChartのAPIにはないっぽい。。。 => simple, text, extend
生成されたURLに無理やりつけるか?
=> ソース読むとtextにすると勝手につけてくれるっぽい

起こってること:
11/28のデータしかチャートに引かれていない
x軸には日付がちゃんとわたっている
しかも11/28なんて日付はない
たぶんすべてのラベルが一か所に固まってる18~25が重なってるから28に見えた。
データがすべて同じ値になっている
レンジが小さすぎる?
履歴データのレンジが最初の値でしかとられていない

確認すること:
エンコーディングをtextに変更
それでもだめなら
heroku環境でGChartへの引数が正しく構成されていることを確認
map!と<<
ローカル環境でGChartの引数がどのように構成されているか確認

https://developers.google.com/chart/image/docs/data_formats
https://github.com/mattetti/googlecharts

from recordiet.

Shinsuke-Abe avatar Shinsuke-Abe commented on July 17, 2024

axisも行けた。

from recordiet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.