{"id":3508,"date":"2014-11-25T17:51:10","date_gmt":"2014-11-25T08:51:10","guid":{"rendered":"http:\/\/www.lancard.com\/blog\/?p=3508"},"modified":"2025-03-12T11:28:22","modified_gmt":"2025-03-12T02:28:22","slug":"pchart2%e3%81%a7%e3%82%b0%e3%83%a9%e3%83%95%e3%82%92%e6%8f%8f%e3%81%8f","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2014\/11\/25\/pchart2%e3%81%a7%e3%82%b0%e3%83%a9%e3%83%95%e3%82%92%e6%8f%8f%e3%81%8f\/","title":{"rendered":"pChart2\u3067\u30b0\u30e9\u30d5\u3092\u63cf\u304f"},"content":{"rendered":"<p>\u30ed\u30a6\u30bd\u30af\u30c1\u30e3\u30fc\u30c8\u304c\u4f7f\u3048\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u63a2\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u3001<br \/>\npChart2\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u898b\u3064\u3051\u307e\u3057\u305f\u306e\u3067\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059<br \/>\n\u3082\u3068\u3082\u3068\u3042\u3063\u305fpChart\u304b\u3089\u66f4\u306b\u6271\u3048\u308b\u30b0\u30e9\u30d5\u306e\u7a2e\u985e\u304c\u5897\u3048\u307e\u3057\u305f<\/p>\n<p>addPoints\u306b\u914d\u5217\u3067\u5024\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u3067\u3001\u30b0\u30e9\u30d5\u306b\u5024\u304c\u63cf\u753b\u3055\u308c\u307e\u3059<br \/>\n\u4eca\u56de\u306fDB\u304b\u3089\u5024\u3092\u629c\u304d\u51fa\u3057\u3066\u914d\u5217\u306b\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u305d\u3053\u306f\u7701\u7565\u3057\u3066\u3044\u307e\u3059<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3509\" src=\"http:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2014\/11\/candle_chart-400x188.png\" alt=\"candle_chart\" width=\"400\" height=\"188\" srcset=\"https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2014\/11\/candle_chart-400x188.png 400w, https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2014\/11\/candle_chart-602x283.png 602w, https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2014\/11\/candle_chart.png 700w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<pre lang=\"php\">\r\n\/\/ \u30b0\u30e9\u30d5\u751f\u6210\r\n$dir = dirname(__FILE__) .'\/..\/..\/public\/pChart\/';\r\ninclude($dir .'class\/\/pData.class.php');\r\ninclude($dir .'class\/pDraw.class.php');\r\ninclude($dir .'class\/pImage.class.php');\r\ninclude($dir .'class\/pStock.class.php');\r\n\r\n\/* Create and populate the pData object *\/\r\n$MyData = new pData(); \r\n$MyData->addPoints($addOpen,\"Open\");\r\n$MyData->addPoints($addClose,\"Close\");\r\n$MyData->addPoints($addMin,\"Min\");\r\n$MyData->addPoints($addMax,\"Max\");\r\n\r\n$MyData->addPoints($addDate,\"Time\");\r\n$MyData->setAbscissa(\"Time\");\r\n$MyData->setAbscissaName(\"Date\");\r\n\r\n\/* Create the pChart object *\/\r\n$myPicture = new pImage(700,330,$MyData);\r\n\r\n\/* Turn of AAliasing *\/\r\n$myPicture->Antialias = FALSE;\r\n\r\n\/* Draw the border *\/\r\n$myPicture->drawRectangle(0,0,699,329,array(\"R\"=>0,\"G\"=>0,\"B\"=>0));\r\n\r\n$myPicture->setFontProperties(array(\"FontName\"=>$dir .\"fonts\/pf_arma_five.ttf\",\"FontSize\"=>6));\r\n\r\n\/* Define the chart area *\/\r\n$myPicture->setGraphArea(60,30,650,290);\r\n\r\n\/* Draw the scale *\/\r\n$scaleSettings = array(\"GridR\"=>200,\"GridG\"=>200,\"GridB\"=>200,\"DrawSubTicks\"=>TRUE,\"CycleBackground\"=>TRUE);\r\n$myPicture->drawScale($scaleSettings);\r\n\r\n\/* Create the pStock object *\/\r\n$mystockChart = new pStock($myPicture,$MyData);\r\n\r\n\/* Draw the stock chart *\/\r\n$stockSettings = array(\r\n    \"BoxUpR\"=>226,\"BoxUpG\"=>159,\"BoxUpB\"=>149,\r\n    \"BoxDownR\"=>180,\"BoxDownG\"=>188,\"BoxDownB\"=>201,\r\n    'BoxUpBorderR'=>220,'BoxUpBorderG'=>75,'BoxUpBorderB'=>66,\r\n    'BoxDownBorderR'=>127,'BoxDownBorderG'=>142,'BoxDownBorderB'=>166,\r\n    );\r\n$mystockChart->drawStockChart($stockSettings);\r\n\r\n\/* Render the picture (choose the best way) *\/\r\n$myPicture->Stroke();\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3510\" src=\"http:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2014\/11\/line_chart-400x188.png\" alt=\"line_chart\" width=\"400\" height=\"188\" srcset=\"https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2014\/11\/line_chart-400x188.png 400w, https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2014\/11\/line_chart-602x283.png 602w, https:\/\/www.lancard.com\/blog\/wp-content\/uploads\/2014\/11\/line_chart.png 700w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<pre lang=\"php\">\r\n$dir = dirname(__FILE__) .'\/..\/..\/public\/pChart\/';\r\ninclude($dir .'class\/pData.class.php');\r\ninclude($dir .'class\/pDraw.class.php');\r\ninclude($dir .'class\/pImage.class.php');\r\n\r\n$MyData = new pData(); \r\n$MyData->addPoints($addPoint,\"Stock price\");\r\n$MyData->addPoints($addDate,\"Labels\");\r\n$MyData->setSerieDescription(\"Labels\",\"Months\");\r\n$MyData->setAbscissa(\"Labels\");\r\n\r\n\r\n\/* Create the pChart object *\/\r\n$myPicture = new pImage(700,330,$MyData);\r\n\r\n\/* Turn of Antialiasing *\/\r\n$myPicture->Antialias = FALSE;\r\n\r\n\/* Add a border to the picture *\/\r\n$myPicture->drawRectangle(0,0,699,329,array(\"R\"=>0,\"G\"=>0,\"B\"=>0));\r\n\r\n\/* Set the default font *\/\r\n$myPicture->setFontProperties(array(\"FontName\"=>$dir .\"fonts\/pf_arma_five.ttf\",\"FontSize\"=>6));\r\n\r\n\/* Define the chart area *\/\r\n$myPicture->setGraphArea(60,40,650,300);\r\n\r\n\/* Draw the scale *\/\r\n$scaleSettings = array(\"XMargin\"=>10,\"YMargin\"=>10,\"Floating\"=>TRUE,\"GridR\"=>200,\"GridG\"=>200,\"GridB\"=>200,\"DrawSubTicks\"=>TRUE,\"CycleBackground\"=>TRUE);\r\n$myPicture->drawScale($scaleSettings);\r\n\r\n\/* Turn on Antialiasing *\/\r\n$myPicture->Antialias = TRUE;\r\n\r\n\/* Draw the line chart *\/\r\n$myPicture->drawLineChart();\r\n\r\n\/* Write the chart legend *\/\r\n$myPicture->drawLegend(540,20,array(\"Style\"=>LEGEND_NOBORDER,\"Mode\"=>LEGEND_HORIZONTAL));\r\n$myPicture->Stroke();\r\n\r\n<\/pre>\n<p>JpGragh\u3068\u304f\u3089\u3079\u3066\u3082\u898b\u6804\u3048\u304c\u826f\u304f\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u6027\u306b\u3082\u5bcc\u3093\u3067\u3044\u307e\u3059<br \/>\n\u305f\u3060\u3053\u306epChart2\u3001\u66f4\u65b0\u304c\u3060\u3044\u3076\u524d\u304b\u3089\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u306a\u306e\u3067\u3001<br \/>\n\u305d\u306e\u8fba\u3092\u6ce8\u610f\u3057\u3066\u4f7f\u308f\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3088\u3046\u3067\u3059<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F3508&#038;t=pChart2%E3%81%A7%E3%82%B0%E3%83%A9%E3%83%95%E3%82%92%E6%8F%8F%E3%81%8F&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F3508&#038;p&#091;images&#093;&#091;0&#093;=http%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-content%2Fuploads%2F2014%2F11%2Fcandle_chart-400x188.png&#038;p&#091;title&#093;=pChart2%E3%81%A7%E3%82%B0%E3%83%A9%E3%83%95%E3%82%92%E6%8F%8F%E3%81%8F\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F3508&#038;text=pChart2%E3%81%A7%E3%82%B0%E3%83%A9%E3%83%95%E3%82%92%E6%8F%8F%E3%81%8F\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F3508&#038;title=pChart2%E3%81%A7%E3%82%B0%E3%83%A9%E3%83%95%E3%82%92%E6%8F%8F%E3%81%8F\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&#038;v=3&#038;t=pChart2%E3%81%A7%E3%82%B0%E3%83%A9%E3%83%95%E3%82%92%E6%8F%8F%E3%81%8F&#038;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F3508\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=pChart2%E3%81%A7%E3%82%B0%E3%83%A9%E3%83%95%E3%82%92%E6%8F%8F%E3%81%8F&#038;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F3508\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>\u30ed\u30a6\u30bd\u30af\u30c1\u30e3\u30fc\u30c8\u304c\u4f7f\u3048\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u63a2\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u3001 pChart2\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u898b\u3064\u3051\u307e\u3057\u305f\u306e\u3067\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059 \u3082\u3068\u3082\u3068\u3042\u3063\u305fpChart\u304b\u3089\u66f4\u306b\u6271\u3048\u308b\u30b0\u30e9\u30d5\u306e\u7a2e\u985e\u304c\u5897\u3048\u307e\u3057\u305f addPoints\u306b\u914d\u5217\u3067\u5024 [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[118],"class_list":["post-3508","post","type-post","status-publish","format-standard","hentry","category-php","tag-pchat"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/3508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=3508"}],"version-history":[{"count":12,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/3508\/revisions"}],"predecessor-version":[{"id":3524,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/3508\/revisions\/3524"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=3508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=3508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=3508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}