Questions tagged [chartkick]

Create beautiful Javascript charts with one line of Ruby, Python, Javascript, React, Vue, Elixir, and Clojure.

Chartkick supports Chart.js, Google Charts, and Highcharts and works with most browsers. Also provides server-side integration for Ruby, Python, Elixir, and Clojure

361 questions
2
votes
1 answer

Chartkick linechart displays previous date with different time

In my Ruby on Rails application , i have the below json and i am displaying the linechart from chartkick. In linechart , it shows previous day's date though date is correct in the json. When i use format it displays the date fully. How we can…
EnthuDev
  • 170
  • 2
  • 3
  • 15
2
votes
0 answers

rails google chart bar chart vAxis label using half of width on mobile

I have a chart that display good on desktop but on mobile/small screen (phone) the label on the v axis is cut off (see image). How can i shrink the graph so that the chart uses 50% of the width while the labels use the other 50% of the chartArea so…
2
votes
0 answers

Rails- Gem chartkick - Remove axis values from bar_graph

I have added a bar_chart using gem chartkick in my rails application and don't want to show axis labels and values. Want to show colored lines only. My initial code was following: <%= bar_chart @data, stacked: true, width: "800px", height: "100px"…
Sohail Aslam
  • 727
  • 4
  • 24
2
votes
2 answers

Div is not updated after selecting value on a dropdown list

I'm trying to display a chart upon selecting a state and a city. The cities dropdown list is populated based on the selection of the state in the first dropdown. The problem is when I click on a city no chart is displayed, nor updated if I change…
GeoSal
  • 333
  • 1
  • 2
  • 15
2
votes
1 answer

Chartkick Datepicker/Range Selector - Possibility to choose dates to show data

I am using ahoy gem to track visits & chartkick gem to show the data to users. In users dashboard page, I have around 3-4 charts and each of them show different data to user. As of today, my charts only displays last 7 days & I do it by…
user7383466
2
votes
2 answers

Multiple Series Line Chart Using Chartkick and Rails

I'm trying to setup a multiple series line chart that shows monthly total exams by modality. Something similar to this chart: I want the modalities to be colored: (CT, MR, US, XR, MG, BD, NM) The monthly date (to_date) will be the X-Axis data…
bradbajuz
  • 175
  • 2
  • 10
2
votes
1 answer

ChartJS options with Chartkick

I have a chartJS chart rendered in Django with chartkick. How do I specify the options. {% column_chart data %} For example I would like to add the following: options: { layout: { padding: { bottom: 5 …
Wessi
  • 1,702
  • 4
  • 36
  • 69
2
votes
1 answer

Rails Chartkick. Multiple Series line chart with nested hash

Trying to do a multiple series line chart. (Visualizer is Chartjs.) From the README: <%= line_chart [ {name: "Series A", data: series_a}, {name: "Series B", data: series_b} ] %> My data is coming in JSON format already, but takes a little…
iamse7en
  • 609
  • 8
  • 21
2
votes
2 answers

How to group by day and sum a calculated property with GroupDate?

I'm using chartkick to render charts in my rails app. And I'd like to use groupdate to query the data for the last 7 days getting 0 if a day is not present. I know I can use it like this: project.time_entries.group_by_day(:created_at, last: 7,…
Carlos Martinez
  • 4,350
  • 5
  • 32
  • 62
2
votes
1 answer

xAxis ticks in Chartkick

I created a chart of User registered/Month chart with Chartkick, however, some data at xAxis is not visible, such as this: Aralık means "December" and Şubat means "February". Even though there aret users registered at "November", there is no…
Burak Özmen
  • 865
  • 2
  • 11
  • 28
2
votes
1 answer

How to show count of data in pie-chart in chartkick rails

I want to show count of data along with percentage.It works but for small percentages nothing appear due to small size.Is it possible to show count and percentage outside chart.Or where list of interests along with them. <%= pie_chart…
Haseeb Ahmad
  • 7,914
  • 12
  • 55
  • 133
2
votes
0 answers

Use ng-href in chartkick for rails

Is it possible to use ng-href="{{userData}}" in chartkick for rails? What I want to do is something like: <%= line_chart ng-href='{{userData}}' %> When my angular app loads up, I call .run like this: kpiApp.run(function($rootScope, $http){ …
Slenny
  • 379
  • 2
  • 4
  • 13
2
votes
0 answers

Chartkick async providing min and max

I'm using ChartKick and with the provided code: <%= line_chart user_application_log_chart_path(@user_application)%> Which should allow the line chart to make an ajax call to my endpoint to get the data on load of the page. But i want to provide the…
Rohan Panchal
  • 1,211
  • 1
  • 11
  • 28
2
votes
2 answers

Chartkick Rails 4 Bar Chart Issue with Multiple Charts

I have a problem where I have multiple poll questions on a page. Simply enough, after a question is answered an AJAX call is made to the controller and a js.erb is rendered displaying a chart using the Chartkick gem and the Google jaspi library. …
user1572597
  • 373
  • 3
  • 15
2
votes
2 answers

Rails 4: Removing grid lines chartkick?

Hi I am trying to make that code work in order to remove both axis using Chartkick with rails 4: <%= line_chart Score.where(employee_id: params[:id]).limit(10).group(:created_at).sum(:average), :library => {hAxis: {lineColor: 'transparent'}, vAxis:…
Antoine
  • 559
  • 8
  • 21