Open NickChilling opened 5 years ago
I tried to customize the color pattern , but I failed .
<kdb-query k-update-elements='trade-chart' k-delay="1000" k-interval="2000" k-execute-on="timer"> `data`axis`bar`grid`color!(`x`columns`type`groups!(`time; ((`time, 2019.01.01 + til 15); (`huobi, 3.2 3.2 3.1 2.3 2.8 2.8 3.3 2.4 2.9 2.7 2.0 3.0 2.2 2.9 2.9); (`binance, 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 0.2 0.2 0.1 0.1 0.2); (`okex, 1.4 1.5 1.5 1.3 1.5 1.3 1.6 1.0 1.3 1.4 1.0 1.5 1.0 1.4 1.3); (`gate, 1.4 1.5 1.5 1.3 1.5 1.3 1.6 1.0 1.3 1.4 1.0 1.5 1.0 1.4 1.3)); `bar;enlist[`huobi,`binance,`okex,`gate]);enlist[`x]!enlist `type`tick!(`timeseries;enlist[`format]!enlist "%Y-%m-%d"); enlist[`width]!enlist enlist[`ratio]!enlist[0.3];enlist[`y]!enlist enlist[`show]!enlist[`true]; enlist[`pattern]!enlist enlist[("yellow", "blue", "green","black")])</kdb-query> <kdb-chart k-style='width:800px;height:400px;' k-id="trade-chart"> </kdb-chart> <kdb-query k-update-elements='c2'> `data`axis`zoom`grid`color!(`x`columns!(`x;((`x,2013.01.01+til 6);(`data1,30 200 100 400 150 250); (`data2,130 340 200 500 250 350)));enlist[`x]!enlist `type`tick!(`timeseries;enlist[`format]!enlist "%Y-%m-%d");enlist[`enabled]!enlist 1b; enlist[`x]!enlist enlist[`lines]!enlist enlist[`value`class`text!(2013.01.03;"grid1";"label1")]; enlist[`pattern]!enlist enlist[("yellow","blue")])</kdb-query>
here is my code . in my web browser, the demo page is like this : all the lines are rendered in black is it a bug or there is something wrong with my code ?
I tried to customize the color pattern , but I failed .
here is my code . in my web browser, the demo page is like this : all the lines are rendered in black is it a bug or there is something wrong with my code ?