amcharts

AmCharts - Compare dataSets with missing values

拈花ヽ惹草 提交于 2019-12-14 02:57:29
问题 I'm using AmCharts to display two datasets which represent number of downloads per two file types: pdf and xls. The chart is similar to the one available at https://www.amcharts.com/demos/multiple-data-sets/, but I set recalculateToPercents option to 'never' to always display actual downloads count for compared series. I'm using hourly period. The problem I encounter is that in situations when there are no downloads in specific hour for first file type (the main dataSet), the value for second

amchart add labels in between grids

一个人想着一个人 提交于 2019-12-13 16:25:07
问题 I need to add labels with difference of 10 in both axis( one each between the grid ), WITHOUT compromising the present number of grids.So the number of grid lines should stay 11 and number of labels will go up to 21. Hope that clears my query.Above is my chart, and this is the code - var chart = AmCharts.makeChart("chartdiv", { "type": "xy", "dataProvider": json, "valueAxes": [ { "id":"my_y", "autoGridCount": false, "position": "right", "tickLength":0, "gridThickness":0.25, "minimum":-100,

AmChart: Change label color of axis

半城伤御伤魂 提交于 2019-12-13 12:47:04
问题 I'm using AmChart to make a serial graph and I want to set a different color for the last category label. Does somebody know how this is possible? This my code to create the graph and return validateData() . var chart = AmCharts.makeChart("historyContent", { "type": "serial", "theme": "light", "dataProvider": loadDataProvider(tag), "valueAxes": [{ "gridColor": "#FFFFFF", "gridAlpha": 0.2, "dashLength": 0 }], "gridAboveGraphs": true, "graphs": [{ "balloonText": "[[p_type]] | [[p_date]]: <b>[

separate json data from html to json file

独自空忆成欢 提交于 2019-12-13 09:47:14
问题 I need to separate chart Data in file HTML to file JSON and poster the chart and the table result -- thanks 回答1: When angular is running in the browser, the json file will be located in the server. You will need to do a angular $http.get to get the data into your angular controller. set the received data in your controller and feed it to your chart. 来源: https://stackoverflow.com/questions/42174833/separate-json-data-from-html-to-json-file

How to show hand cursor on pie charts slices using amcharts

徘徊边缘 提交于 2019-12-13 07:58:02
问题 How can we make the pie charts slice as a hyperlink or how to show at least hand cursor on slices. check the code below. which i am using creating a pie chart using amcharts. var initChart = function() { if (chart) chart.destroy(); var config = scope.config || {}; chart = AmCharts.makeChart(scope.chartid, { "type": "pie", "theme": "light", "marginTop": 10, "marginBottom":10, "allLabels": [{ "text": scope.index, "color": "green", "bold" : true, "align": "center", "size": 20, "y": 190, }],

AmCharts: Clustered bar chart with sub-categories

末鹿安然 提交于 2019-12-13 06:36:35
问题 I try to realize a clustered bar chart with sub-categories in amcharts (two levels in my x-axis). I couldn't find a way to do it. Does anyone know how to do it ? An example of my data and the graph I need is available in the following link : https://www.european-datalab.com/data-clustered-bar-chart/ 回答1: The tricky part is the parent category name_fr on the graph. To do that, we need to use Guide (https://docs.amcharts.com/3/javascriptcharts/Guide) within the CategoryAxis . But in order to

amCharts wrong Zoom startDates and endDates

邮差的信 提交于 2019-12-13 04:21:02
问题 I am using amCharts for displaying stock data. I have 7 zoom levels: 1H, 1D, 1W, 1M, 3M, 1Y, MAX . For 1H, 1D, I am using a dataset which contains minute wise data. For 1W, 1M, I use a different dataset which has hour wise data. And for rest 3 levels, I have another dataset with day wise data. Now here is my problem: When initially, I load minute wise data at default zoom level 1D, and add a listener "changed" to chart.periodSelector , after clicking on 1W button or any further zoom level

amChart total values of graphics

六月ゝ 毕业季﹏ 提交于 2019-12-13 03:51:16
问题 I want to write all of the total values in some where in graphics. My graphics may be column or stacked chart. How can I calculate all summ values in data and write? "dataProvider": [ { "country": "USA", "visits": 2025 }, { "country": "China", "visits": 1882 }, { "country": "Japan", "visits": 1809 } ] Or stacked data "dataProvider": [{ "year": 2003, "europe": 2.5, "namerica": 2.5, "asia": 2.1, "lamerica": 0.3, "meast": 0.2, "africa": 0.1 }, { "year": 2004, "europe": 2.6, "namerica": 2.7,

amcharts interactive map: making selected states a clickable link

我怕爱的太早我们不能终老 提交于 2019-12-13 03:38:17
问题 I am creating a personal blog site. I stumbled upon an interactive visited states map in which I wanted to implement in one of my html page. I was able to successfully put it on my website with the generated html they provided. However, I wanted to tweak it a little bit but I'm not all familiar with javascript. There are two things I want to add: 1st: Make the selected states link to a specific html page. 2nd (optional): Disable the zoom and color change when clicking on states that are not

Unable add ValueAxis property to Amchart stock graph

≯℡__Kan透↙ 提交于 2019-12-13 02:56:09
问题 I'm trying to add title to the first graph in a multiple stock graphs list. But it doesn't show up. Here is the code: stockGraphs: [{ id: "g1", valueField: "value", comparable: true, bullet: "round", valueAxis: [ { title: "t1" }] }] Here is a demo 回答1: As indicated in the documentation, the valueAxis property takes an id or a reference to the valueAxis object. You're trying to assign an array, which is way off. You need to add an id to the valueAxes array inside your panel in your demo, then