How do I align date and values to gridlines in Google Chart?

Changing the date format (mm/dd/yyyy vs. yyyy-mm-dd) seems to get it to align… google.load(‘visualization’, ‘1’, { packages: [‘corechart’] }); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn(‘date’, ‘date’); data.addColumn(‘number’, ‘view’); data.addRows([ [new Date(’08/01/2015′), 5], [new Date(’08/02/2015′), 7], [new Date(’08/03/2015′), 2], [new Date(’08/04/2015′), 16], [new Date(’08/05/2015′), 3], [new Date(’08/06/2015′), 6], [new Date(’08/07/2015′), 1] ]); … Read more

How to change colours for Angular-Chart.js

Your should declare colours object as an array “colours”: [{ fillColor: ‘rgba(47, 132, 71, 0.8)’, strokeColor: ‘rgba(47, 132, 71, 0.8)’, highlightFill: ‘rgba(47, 132, 71, 0.8)’, highlightStroke: ‘rgba(47, 132, 71, 0.8)’ }]; Working Plunkr For more info refer this post / this too. For newer versions, see eli0tt’s answer, as the parameter names have changed.

Read data from CSV file into ArrayList and display in XY Chart

Several problems are evident: You never add anything to lines; at a minimum, you’ll need something like this: lines.add(line); Instead of ChartFactory.createXYLineChart(), consider creating a time series: ChartFactory.createTimeSeriesChart(…) The XYDataset returned by createDataset() should be a TimeSeriesCollection to which you add a TimeSeries. In createDataset(), iterate though lines, parse the data fields, and add the … Read more

Charts for Android [closed]

To make reading of this page more valuable (for future search results) I made a list of libraries known to me.. As @CommonsWare mentioned there are super-similar questions/answers.. Anyway some libraries that can be used for making charts are: Open Source: AnyChart (Free for non-commercial, Paid for commercial) MPAndroidChart Holo Graph Library aChartEngine ChartView aFreeChart … Read more

Chart.js v2: How to make tooltips always appear on pie chart?

Solution for ChartJs Version > 2.1.5: Chart.pluginService.register({ beforeRender: function (chart) { if (chart.config.options.showAllTooltips) { // create an array of tooltips // we can’t use the chart tooltip because there is only one tooltip per chart chart.pluginTooltips = []; chart.config.data.datasets.forEach(function (dataset, i) { chart.getDatasetMeta(i).data.forEach(function (sector, j) { chart.pluginTooltips.push(new Chart.Tooltip({ _chart: chart.chart, _chartInstance: chart, _data: chart.data, _options: … Read more

Selecting specific values on a Chart

For directly clicking on a DataPoint you can do a HitTest. But for tiny points or for a selection of a range this will not work well. The necessary functions are hidden in the Axes methods. This solution uses a regular rubber-band rectangle to select the points caught: Point mdown = Point.Empty; List<DataPoint> selectedPoints = … Read more

coca pod Chart not appearing (Swift4)

Try this one it’s is Working (Swift 4 Code). import UIKit import Charts class RootViewController: UIViewController { @IBOutlet weak var lineChartView: BarChartView! var days: [String]! override func viewDidLoad() { super.viewDidLoad() days = [“Monday”,”Tuesday”,”Wednesday”,”Thursday”] let task = [1.0,4.0,3.0,5.0] setChart(dataPoints: days, values: task) } func setChart(dataPoints : [String], values : [Double]){ lineChartView.noDataText = “Nothining to display” var … Read more