{"id":110990,"date":"2014-09-08T22:42:31","date_gmt":"2014-09-08T22:42:31","guid":{"rendered":"http:\/\/www.timestored.com\/b\/?p=110990"},"modified":"2014-09-08T22:42:31","modified_gmt":"2014-09-08T22:42:31","slug":"command-line-kdb-charts","status":"publish","type":"post","link":"https:\/\/www.timestored.com\/b\/command-line-kdb-charts\/","title":{"rendered":"Command Line Kdb+ Charts"},"content":{"rendered":"<p><a href=\"http:\/\/www.sqldashboards.com\">sqlDashboards<\/a> are included as a bundle with <a href=\"http:\/\/www.timestored.com\/qstudio\/\">qStudio<\/a>, part of that package is a command line utility called <strong><a href=\"http:\/\/www.sqldashboards.com\/sqlchart\">sqlChart<\/a><\/strong> that allows generating customized sql charts from the command line. <\/p>\n<p>Checkout the video to see how you can create a chart based on data from a kdb+ database in 2 minutes:<\/p>\n<div class=\"media\"><object id=\"csSWFb\" width=\"854\" height=\"480\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"scale\" value=\"showall\" \/><param name=\"allowfullscreen\" value=\"true\" \/><param name=\"allowscriptaccess\" value=\"always\" \/><param name=\"flashvars\" value=\"tocdoc=left&amp;showsearch=true&amp;autostart=false&amp;autohide=true&amp;content=\/b\/videos\/sqlchart-command-line-demo.mp4&amp;thumb=\/b\/videos\/sqlchart-command-line-demo.png&amp;containerwidth=854&amp;containerheight=480&amp;smoothing=true&amp;enablejsapi=true&amp;fullscreen=true&amp;windowbox=false&amp;showbranding=false&amp;showstartscreen=true&amp;showendscreen=false&amp;basecolor=272727&amp;loop=false\" \/><param name=\"src\" value=\"\/js\/video_controller.swf\" \/><embed id=\"csSWFb\" width=\"854\" height=\"480\" type=\"application\/x-shockwave-flash\" src=\"\/js\/video_controller.swf\" scale=\"showall\" allowfullscreen=\"true\" allowscriptaccess=\"always\" flashvars=\"tocdoc=left&amp;showsearch=true&amp;autostart=false&amp;autohide=true&amp;content=\/b\/videos\/sqlchart-command-line-demo.mp4&amp;thumb=\/b\/videos\/sqlchart-command-line-demo.png&amp;containerwidth=854&amp;containerheight=480&amp;smoothing=true&amp;enablejsapi=true&amp;fullscreen=true&amp;windowbox=false&amp;showbranding=false&amp;showstartscreen=true&amp;showendscreen=false&amp;basecolor=272727&amp;loop=false\" \/><!--[if !IE]>--> <img loading=\"lazy\" src=\"https:\/\/www.timestored.com\/b\/wp-includes\/js\/tinymce\/themes\/advanced\/img\/trans.gif\" class=\"mceItemMedia mceItemFlash\" width=\"853\" height=\"480\" data-mce-json=\"{'video':{},'params':{'scale':'showall','allowfullscreen':'true','allowscriptaccess':'always','flashvars':'tocdoc=left&amp;showsearch=true&amp;autostart=false&amp;autohide=true&amp;content=\/kdb-guides\/videos\/dans-python-api.mp4&amp;thumb=\/b\/videos\/sqlchart-command-line-demo.png&amp;containerwidth=854&amp;containerheight=480&amp;smoothing=true&amp;enablejsapi=true&amp;fullscreen=true&amp;windowbox=false&amp;showbranding=false&amp;showstartscreen=true&amp;showendscreen=false&amp;basecolor=272727&amp;loop=false','src':'\/js\/video_controller.swf'},'name':null,'object_html':'&lt;!--&lt;![endif]--&gt;&lt;div&gt;&lt;p&gt;The video content presented here requires JavaScript to be enabled and the latest version of the Adobe Flash Player. If you are using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Adobe Flash Player by &lt;a href=\\&quot;http:\/\/www.adobe.com\/go\/getflashplayer\\&quot;&gt;downloading here&lt;\/a&gt;.&lt;\/p&gt;&lt;\/div&gt;&lt;p&gt;&lt;!--[if !IE]&gt;--&gt;&lt;\/p&gt;','hspace':null,'vspace':null,'align':null,'bgcolor':null}\" alt=\"\" \/><!--<![endif]--><\/object><\/div>\n<p>The <a href=\"http:\/\/www.sqldashboards.com\/sqlchart\">sqlChart<\/a> page has all the documentation you need, <b>Download the <a href=\"http:\/\/www.timestored.com\/qstudio\/files\/qstudio.zip\">qstudio.zip<\/a> to try it now.<\/b><\/p>\n<h3>The q Code<\/h3>\n\r\n<textarea readonly=\"readonly\" style=\"background: #111; color:#EEE\" rows=\"2\" cols=\"90\" class=\"code\">\r\nC:\\temp\\ch\\qstudio>sqlchart -s kdb -P 5000 -e \"([] dt:2013.01.01+til 21; cosineWave:cos a; sineWave:sin a:0.6*til 21)\" -c timeseries -W 600 -t  dark\r\nC:\\temp\\ch\\qstudio\\out.png\r\n<\/textarea>\r\n\n<h4>Help Screen<\/h4>\n\r\n<textarea readonly=\"readonly\" style=\"background: #111; color:#EEE\" rows=\"20\" cols=\"90\" class=\"code\">\r\nC:\\temp\\ch\\qstudio>sqlchart\r\nOption (* = required)             Description\r\n---------------------             -----------\r\n-?, --help                        Display a help message and exit.\r\n-D, --database <db_name>          The database to use.\r\n-H, --height <output_height>      Set the height of the chart output\r\n                                    (default: 300)\r\n-P, --port <port_num>             The TCP\/IP port number to use for the\r\n                                    SQL Server connection.\r\n-W, --width <output_width>        Set the width of the chart output\r\n                                    (default: 400)\r\n-c, --chart <chart_type>          Set the selected chart type. Options\r\n                                    available: timeseries, areachart,\r\n                                    barchart, bubblechart, candlestick,\r\n                                    datatable, heatmap, histogram,\r\n                                    linechart, noredraw, piechart,\r\n                                    scatterplot (default: barchart)\r\n-e, --execute <sql_statement>     Execute the selected sql statement.\r\n-h, --host <host_name>            SQL server host that will be queried.\r\n                                    (default: localhost)\r\n-o, --out <file_name>             The name of the destination image\r\n                                    file. (default: out.png)\r\n-p, --password <password>         Password used to connect to SQL server.\r\n* -s, --servertype <server_type>  The type of sql server being queried.\r\n                                    Valid values include:kdb,mysql,\r\n                                    postgres,mssql,h2.\r\n-t, --theme <color_theme>         Set the color theme for the chart.\r\n                                    Options available: light,dark,pastel\r\n                                    (default: light)\r\n-u, --user <user_name>            Username used to connect to SQL server.\r\n<\/textarea>\r\n\n","protected":false},"excerpt":{"rendered":"<p>sqlDashboards are included as a bundle with qStudio, part of that package is a command line utility called sqlChart that allows generating customized sql charts from the command line. Checkout the video to see how you can create a chart based on data from a kdb+ database in 2 minutes: The sqlChart page has all [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0},"categories":[2,92],"tags":[66,90,11,93],"_links":{"self":[{"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/posts\/110990"}],"collection":[{"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/comments?post=110990"}],"version-history":[{"count":6,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/posts\/110990\/revisions"}],"predecessor-version":[{"id":110996,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/posts\/110990\/revisions\/110996"}],"wp:attachment":[{"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/media?parent=110990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/categories?post=110990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.timestored.com\/b\/wp-json\/wp\/v2\/tags?post=110990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}