LoginSignup
2
1

More than 3 years have passed since last update.

Chartkickで入力していない日付の表示をしたくない

Posted at

今回実装したいこと

Chartkickで入力していない日付の表示をしたくない。
以下のように入力していない日付のX軸の表示を消したい。

スクリーンショット 2020-05-14 10.53.03.png

結論

discrete: trueを追加する。

↓変更前

<%= line_chart @data, xtitle: "Day", ytitle: "Number", curve: false %>

↓変更後

<%= line_chart @data, xtitle: "Day", ytitle: "Number", curve: false %>

↓解決

スクリーンショット 2020-05-14 10.58.32.png

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1