I have an AgGrid displaying data in the following format (first row is the column names):
Metric, Jan, Feb, ... Dec
metricA, 2, 5, ...
metricB, 4, 6, ...
...
When the user exports the grid into CSV, I want the format to be:
Date, metricA, metricB, ...
Jan, 2, 4, ...
Feb, 5, 6, ...
...
Is there a way to accomplish this via AgGrid's built-in csv export features?
I have looked into processCellCallback, processHeaderCallback but doesn't look like they can be used to accomplish this.
Related
I need help with c3.js library,
It's about the input of "data"
Thank in advance!!!
I had an array: Arr = [[1, 2, 3], [4, 5, 6], [7, 8 ,9]]
How can I draw 3 different lines for 3 element of Arr?
var chart = c3.generate({
bindto: '#chart',
data: {
columns: [
**Arr**
],
})
And also want to change the tooltip's title, every point has a different content, for example:
when I hover the point: Arr[0][1], its content is [no2]
Arr[0][2], its content is [no3], Arr[1][0], its content is [no4],...
I have a line graph which can drop down in a straight line. e.g. I have a point at (1, 100) then a point at (1,0). However, highcharts (https://www.highcharts.com/) will only display information for one of the points. Is it possible to get it to show information on both points when I hover over each of them?
The default for line type series is findNearestPoint: 'x' https://api.highcharts.com/highcharts/plotOptions.line.findNearestPointBy .
If you change that to findNearestPoint: 'xy', you'll get the behavior you want.
Highcharts.chart('container', {
series: [{
findNearestPointBy:'xy',
data: [
[0, 29.9],
[1, 50],
[1, 71.5],
[3, 106.4]
]
}]
});
http://jsfiddle.net/vt1cep0L/2/
I encountered a problem when using Irregular time data chart in highcharts to draw a chart. problem as follows:
this is the series array:
series : [
{
name:'test chart'
data:[
[Date.UTC(1970, 9, 21), 0],
[Date.UTC(1970, 10, 4), 0.28],
[Date.UTC(1970, 10, 9), 0.25]
......
]
}
]
If the length of data array of a serie in series array is more than 1000,the chart won't be drawn ,and it shows blank ,but when the length of the data array is less than 1000,the chart shows normally.why? and how to fix it?is it a limitation of highchart for Irregular time data chart ?
Check turbo-threshold property if set ,Highcharts works well even for 1 million points. Share the fiddle with problem
Update : similar question answered already by Highchart Champ sebastian at Highcharts 3 cannot render more than 1000 points in one series
use : http://api.highcharts.com/highcharts#plotOptions.series.turboThreshold
in your series
series: [
{
type: 'scatter',
name: 'some name',
data: something,
turboThreshold: 7000,}
]
I have bar chart in high chart. I send it items for x & y. It happened that x-values are numerics. In such case, it assumes that there are missing entries and add the missing entries. I want to force high chart not to include those assumed items. Is that possible without using categories?
http://jsfiddle.net/96bk4661/1/
$(function () {
$('#container').highcharts({
"chart": {
"type": "column"
},
"series": [{
"name": "X-Axis",
"data": [
[1, 77926],
[2, 71245],
[4, 75275],
[5, 78175],
[6, 75369],
[7, 78145],
[8, 77638],
[9, 75706],
[12, 77491]
],
"color": "#1AA4D5"
}]
});
});
This one is different from http://stackoverflow.com/questions/15973457/automatically-join-missing-data-gaps-in-highcharts-js
I don't want the values to be included on the x-axis.
Use highstock and then set ordinal parameter as true.
xAxis:{
ordinal:true
},
Example: http://jsfiddle.net/96bk4661/2/
Seems there's no other way and I am using categories. Thanks #Ondkloss !
I'ved got a line chart like this with date data (not including time)
new Chartkick.LineChart("chart-2", {"2013-02-10": 11, "2013-02-11": 6});
http://jsfiddle.net/yekLh/1/
why does chartkick always have to include time ?
how do i show the series in dates only ?
This is the answer, with discrete and hAxis,
http://jsfiddle.net/yekLh/5/
new Chartkick.LineChart("chart-2",
{"2013-02-10": 11, "2013-02-11": 6, "2013-02-12": 12, "2013-02-13": 5},
{"library":
{title: "Company Performance",
"hAxis":{"title":"Date","gridlines":
{"count":3,"color":"#CCC"},"format":"dd/MM/yy"}},
"discrete": true});