amcharts

AmChart legend in one line

只谈情不闲聊 提交于 2019-12-06 03:50:37
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 any advice. you can try legend{ "maxColumns": 1, } I think it auto resize follows width of div. Btw, You

Is it possible to display only one Y axis in Multi value amChart?

我与影子孤独终老i 提交于 2019-12-05 19:04:20
I have an Multi Value AmChart where I'm sending dynamic values and is working as expected but as I'm sending the values dynamically which is of percentage value it doesn't require the Y-axis separately for all the lines . Only one y axis is enough for all the lines. I'm able to disable the appearing y axis and and I also created a single y-axis (static y axis) but it is not synchronized with the series of chart. trend() { this._chart = am4core.create( "trend_yield", am4charts.XYChart ); this._chart.data = this._TChart; this._chart.legend = new am4charts.Legend(); this._selectedItems.forEach(

AmCharts, capturing click event for period selector

旧巷老猫 提交于 2019-12-05 13:30:29
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 item _.each(chart.panels, function (item) { //item.addListener("zoomed", onZoomed); item.addListener(

Latitude/Longitude coordinates are not correct in amMap USA map

旧城冷巷雨未停 提交于 2019-12-05 07:51:44
I am building a map using the usaLow.js map. On map init, I call a json method that returns this data: [{latitude: "40.4258686",longitude: "-86.9080655"}] With this data I add to the map's data provider (mapData) with this: mapData.images = []; for(var i = 0; i < resp.length; ++i){ mapData.images.push({ type: "circle", color:"#FF0000", latitude: parseFloat(resp[i].latitude), longitude: parseFloat(resp[i].longitude) }); } map.validateData(); This location should be in Indiana, but this is where I see the marker: Do lat/long coordinates need to be converted when not using world maps? If so, how

amcharts - Graph not displaying values/Use ajax to plot amcharrt/How to plot amchart by querying database

北城余情 提交于 2019-12-04 18:16:50
Here my HTML & javascript code to get amcharts plot going I make a call to the database, retrieve the results by converting it to a json format in PHP & then pass it to a graph to display. The chartData variable below has the output that the database query returns. when I statically assign the expected output to chartData variable, the graph plots. However, when I assign the variable "sql_resp" which the responseText value of the json retuned, the graph says "undefined" values. I've used web tools such as firebug to be 100% sure that the json is indeed coming back in the result. This is the

javascript - for loop to generate charts (amchart)

旧城冷巷雨未停 提交于 2019-12-04 16:54:12
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++) { /* chart initialization */ var chart_num = "chart" + i.toString(); var plot_num = "plot" + i.toString(); var

手绘风格的数据可视化实现 Sketchify

大城市里の小女人 提交于 2019-12-04 15:54:23
多少年以前,我在一家BI企业负责数据可视化产品的开发,作为产品创新的需要,一篇论文吸引了我的目光,《 Sketchy Rendering for Information Visualization 》(该论文发表于2013年) 于是我带这两个实习生,利用论文中的知识做出了该工具的原型。收到了领导的赞许,就像很多有用和没用的创新一样,这东西最终无疾而终了。 论文的核心是对基本的图形元素的利用随机变形实现手绘风格。例如线和圆: 最近我发现一些手绘风格图表库出现在我的视野,例如 chart.xkcd 和 chartjs-plugin-rough 。 chart.xkcd风格很好看,但是支持的图表类型有限。 chartjs-plugin-rough仅仅是 chartjs 的扩展,使用的范围也很有限。 我希望能有一个通用的工具能够把任意类型的数据可视化转化为手绘风格,于是开发了这个 Sketchify 。 Sketchify同样是基于 Roughjs ,Roughjs是是个非常强大的手绘风格基础工具,可以实现基本的绘画元素在Canvas和SVG上的手绘风格的实现。 Skethcify的原理非常简单,从一个给定的根DOM元素开始,找到所有的SVG对象,然后递归寻找所有的子元素,读出子元素的基本属性,利用roughjs创建一个手绘风格的元素拷贝,隐藏原始元素

javascript/amcharts - easy way to use legend to show/hide columns of 1 graph for Amchart Column Chart

放肆的年华 提交于 2019-12-04 07:12:16
问题 I can't seem to find an easy way to add legend which has switchable functionality for items in a single graph for amcharts. I searched around and found a column chart which has switchable graphs (JSFiddle 1). I found switchable items legend but it doesn't resize properly (JSFiddle 2). This is the closest I can find to adding legends from multiple items of single graph (CodePen 1). It is from amchart website itself but there is no switchable functionality. How can I add the switchable

Highlighting the highest and lowest point in amcharts

风格不统一 提交于 2019-12-02 21:09:00
问题 Could someone help me on changing the bullet or highlighting the highest and lowest values using amcharts?. I am using serial chart. The condition given in the function "highlight" is matching , however the the bullets are not highlighted to the highest and lowest points.. Any help will be appreciated. Please find my code below. <link rel="stylesheet" href="style.css" type="text/css"> <script src="amcharts/amcharts.js" type="text/javascript"></script> <script src="amcharts/serial.js" type=

Get an instance of AmChart using ID / All the charts in AmCharts4 Angular-Typescript

℡╲_俬逩灬. 提交于 2019-12-02 19:51:12
问题 Earlier we used get them using this.AmCharts AmCharts had provided us AmChartsService , using this we could get an hold of all the charts in the dom , with the upgrade what is the new way to get all the charts in the page ? 来源: https://stackoverflow.com/questions/54821598/get-an-instance-of-amchart-using-id-all-the-charts-in-amcharts4-angular-typesc