ã¯ã¦ãªæ³¨ç®ãã¼ã¯ã¼ããã°ã©ãåãã GreaseMonkey
http://rails2u.com/misc/hatena_hotkeyword_graph.user.js
ã¯ã¦ãªã®æ³¨ç®ãã¼ã¯ã¼ãã§ã¯ãã®æ¥ã©ããªãã¼ã¯ã¼ãã注ç®ããã¦ãããã解ã£ã¦çµæ§é¢ç½ãã§ããè¦è¦çã«è§£ãã¨ãã£ã¨é¢ç½ãããã¼ãã¨ãããã㧠PlotKit + GreaseMonkey ã§ãµã¯ãã¨ä½ã£ã¦ã¿ã¾ããã
ãããªæãã§è¡¨ç¤ºããã¾ãã1ç»é¢å ã®ã°ã©ãã«ä¸»ã ã£ããã¼ã¯ã¼ãã表示ãããã®ã§ãããã£ãããããã°ãã®æ¥ãããªäºãã£ããã¼ãã¨ããã®ã解ã£ã¦å²ã¨é¢ç½ãã¨æãã¾ãããã¡ããã¸ã£ã³ã«äºã®è¡¨ç¤ºãªã©ã«ã対å¿ãã¦ã¾ããã¾ãä¾ãã°å æ¥ã®å¤§åé»ã®æ¥ã®ã°ã©ãã§ãã
ãã®ããã«ãæ®æ®µãã¾ã使ããã¦ãªããæ±é»ãã¨ãããã¼ã¯ã¼ããä¸æçã«ãã¡ããã¡ã使ããã¦ãäºã解ã£ã¦é¢ç½ãã§ãã
æè¡çãªã¨ããã§ã¯ãGreaseMonkey ã®éçºãªãã¤ãã«ä¸¸æãã¾ãããï¼ã§ã馴æã¿ãªç ç³ãã ã®å¤é¨ã©ã¤ãã©ãªã使ãæ¹æ³( GreaseMonkey 㧠MochiKit 使ã£ã¦ã¿ããããªãã¡å¤é¨ã©ã¤ãã©ãªã®èªã¿è¾¼ã¿ããããã¯ã¯ã¦ãªã®ã°ã©ãã綺éºãããªã )ã§è§£èª¬ããã¦ãã dll() é¢æ°ã§ MochiKit 㨠PlotKit ãèªã¿è¾¼ãã§ä½¿ã£ã¦ã¾ãã
ã¾ã PlotKit ã«ã¯ EasyPlot() ã¨ããç°¡åã«ã°ã©ããæ¸ãã¤ã³ã¿ã¼ãã§ã¤ã¹ãç¨æããã¦å±
ãã®ã§ãããå²ã¨ãã¼ã¿ãäºåã«å å·¥ããªãã¨ä½¿ããªãã£ããããã®ã§ãèªä½ã® PlotKit.SimplePie ã¨ããã©ããã¼ã©ã¤ãã©ãªã使ã£ã¦ã°ã©ããåºåãã¦ãã¾ãã使ãæ¹ã¯
SimplePie( [[ã©ãã«å, æ°å¤], [ã©ãã«å, æ°å¤], ...], // ãã¼ã¿ã®é å ã³ã³ããè¦ç´ , // DIV ãªã©ã®ã°ã©ããåºåããè¦ç´ ãªãã·ã§ã³ // Pie æç»ã®ãªãã·ã§ã³ + ãã®ä»ã®ã©ãã«å + %ã®ãããå¤ );
ãªã©ã¨ãã¦ä½¿ãã¾ãããã¨ãã°ãã® GM ã§ã¯
SimplePie(data, container, { axisLabelFontSize: 10, threshold: 2, otherLabel: 'Other' });
ãã©ã³ããµã¤ãºã¯ 10 ã§ãå²åã2%以ä¸ã®ãã¼ã¿ã¯ãã®ä»ã«å«ãããã«ãããå¤ãè¨å®ãããã®ä»ã®ã©ãã«åã 'Other' ã¨ãã¦ãã¾ãã