Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c3 color pattern can't be customized #7

Open
NickChilling opened this issue Jul 23, 2019 · 0 comments
Open

c3 color pattern can't be customized #7

NickChilling opened this issue Jul 23, 2019 · 0 comments

Comments

@NickChilling
Copy link

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 :
image
all the lines are rendered in black
is it a bug or there is something wrong with my code ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant