amcharts

AmChart legend in one line

只愿长相守 提交于 2019-12-22 09:26:14
问题 I'm trying to get AmChart chart legends into one line, but without luck. Legends are separated (one for line). Actual settings for from documentation http://docs.amcharts.com/3/javascriptcharts/AmLegend is following. "legend": { "equalWidths": false, //"periodValueText": "total: [[value.sum]]", "position": "bottom", "valueAlign": "left", "labelWidth": 100, "valueWidth": 200, //"width": 100, "align": "center" }, I Would like to ask how to get all chart legends into one line? Many Thanks for

AmCharts, capturing click event for period selector

别来无恙 提交于 2019-12-22 08:04:57
问题 I'm using AmCharts 3 and I was wondering is there a way to capture an event for clicking the buttons of the period selector? The Docs state I can add a listener to the period selector of the type 'changed' but then the event runs almost anytime There is a listener for 'zoomed', but it runs every time I zoom my chart regardless if I clicked the period selector Here's my attempt: chart = AmCharts.makeChart(scope.vm.chartId, chartSettings); AmCharts.addInitHandler(function () { // add events to

javascript - for loop to generate charts (amchart)

好久不见. 提交于 2019-12-21 21:36:16
问题 Am trying to generate multiple line charts at one go using the code below. However, it isn't working. What would be the best way to generate graphs using a for/while or any other looping mechanism? I have many charts to generate. var db_query = Array(); db_query[1] = <?php echo json_encode($db_query_1) ?>; db_query[2] = <?php echo json_encode($db_query_2) ?>; var chartConfig1 = clone(chartConfigLineOne); var chartConfig2 = clone(chartConfigLineOne); for(var i=1, len=2; i <= len; i++) { /*

How to add legends in Amserial charts

穿精又带淫゛_ 提交于 2019-12-20 07:47:53
问题 I am using Amcharts in my AngularJS Application to create a simple bar chart.The following is my code in the controller: let empChart; let empBarGraph; let empLine; const writeemp = data => { const { total, employees, } = data; empChart.dataProvider = e; empChart.write('emp'); empChart.validateData(); }; AmCharts.handleLoad(); var configChart = function () { empChart = new AmCharts.AmSerialChart(); empChart.categoryField = "state"; empChart.labelRotation = 90; var yAxis = new AmCharts

Amcharts click event in Angular 2 not working

若如初见. 提交于 2019-12-20 05:00:16
问题 Here is my codebase export class myComponent implements OnInit { minHist; maxHist; } public callAmcharts(whichFilterType:String){ this.amchart = AmCharts.makeChart( "chart", { "type": "serial", "theme": "light", "dataProvider": this.TrendData, "valueAxes": [ { "gridColor": "#FFFFFF", "gridAlpha": 0.2, "dashLength": 0 }], "gridAboveGraphs": true, "startDuration": 1, "graphs": [ { "balloonText": "[[category]]: <b>[[value]]</b>", "fillAlphas": 0.8, "lineAlpha": 0.2, "type": "column", "valueField

Amcharts 4 getting nested array data

久未见 提交于 2019-12-20 04:21:19
问题 I am using amcharts 4 and wanted to use my nested data, I know amcharts doesn't support nested data so I added a on parseended event to change the structure of my json. I can get the id of the event but I can't add the data of the array in the object. I can see with my debugger that he actually goes through each object of the nested array, but he doesn't add them to the newDataItem object. My JSON: {{ "Event": { "@id": "45", "@name": "SP:StmtCompleted", "Column": [ { "@id": "1", "@name":

amChart legend appearance

喜夏-厌秋 提交于 2019-12-18 05:09:09
问题 I have an amChart with many rows, like this one. The legend looks a bit awfull. Is it possible to display the legend in a single row with some scrolling? like for the columns? (I don't want to change the container div's height ) 回答1: The question is too old to answer but still it may help someone to get rid of this problem quickly. Following is the proper documentation provided by amcharts: https://www.amcharts.com/tutorials/putting-a-legend-outside-the-chart-area/ And here is the JsFiddle

AmCharts removing columns from dataProvider with validateData() not working

ε祈祈猫儿з 提交于 2019-12-14 04:06:04
问题 I recently asked about a way to hide columns in AmCharts using hide/show buttons, and it worked pretty well. However, I am now separating functions into different files to create a more dynamic web application. The page peptide.html holds mostly HTML code, and refers to displayAmCharts.js for the displaying of the AmChart and to any file, in this case 1A80_HUMAN_R_QDAYDGK_D.js , in the data/peptide folder to dynamically load data from. Loading and displaying the data in the AmChart is working

Bar Chart slow zoom In/out - AmCharts

柔情痞子 提交于 2019-12-14 03:58:34
问题 While zooming my Bar amchart is rendering very slow when data is large, that is, 2975 points. Although, rendering is fine but it is lagging while zooming in/out using drag icon. The code is as below: for(var i=0; i<title.length; i++) { var graphElem = { "title":title[i], "valueField":valueFields[i], "valueAxis":"v1", "type": "column", "fillAlphas": 0.8, "lineAlpha": 0.2 }; graph.push(graphElem); } var chart = AmCharts.makeChart(graphType, { "type": "serial", "theme": "light", "pathToImages":

AM Chart not displaying properly with bulk data in pie chart

♀尐吖头ヾ 提交于 2019-12-14 03:20:43
问题 My amChart is not showing properly, datas are getting truncated. And I am not getting the information in info box as well. Please refer to the screenshot attached and help accordingly. Beside that how can I show a chart with blank record. ie No content available when there is no data. But I dont want to get the blank legends which are generating automatically with blank data. 回答1: You can use below code when there will blank data. It will show "The chart contain no data" AmCharts