amstock

Conditional Chart area fill in amCharts - amStockCharts

你离开我真会死。 提交于 2019-12-24 20:44:45
问题 I want to display a graph very similar to below tradingView chart in amCharts. The problem is how can I fill the area between two specific line graphs with different fill color depending on which line graph is above the other. Using fillToGraph will always fill the same color regardless of whether that graph is below or above the another graph and ends up mixing both the colors as shown below. I am using amCharts v3. Please help. 来源: https://stackoverflow.com/questions/53446791/conditional

Amcharts: chartScrollbar is undefined in event callback

帅比萌擦擦* 提交于 2019-12-24 09:00:12
问题 I want to replicate the following example. When I try to access the chartBoard property I receive an error that this object is undefined . rendereMethod(e) { console.log("rendered") var sb = e.chart.chartScrollbar.set.node; sb.addEventListener("mousedown", function() { e.chart.mouseIsDown = true; }); e.chart.chartDiv.addEventListener("mouseup", function() { e.chart.mouseIsDown = false; // zoomed finished console.log("zoom finished", e.chart.lastZoomed); }); }, That is weird because

amCharts Stock Chart with multiple datasets not showing

早过忘川 提交于 2019-12-22 11:39:47
问题 I went through the examples and docs of amCharts. Here is my problem: the chart is showing just a line and not two as defined in the 2 datasets: var chart; function createStockChart() { chart = new AmCharts.AmStockChart(); // DATASETS ////////////////////////////////////////// var dataSet = new AmCharts.DataSet(); chart.dataSets = [{ title: "XWD.TO", color: "#000000", fieldMappings: [ { fromField: "value", toField: "value" }, { fromField: "volume", toField: "volume" } ], dataProvider:

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

How to get the data using dataLoader in amCharts?

十年热恋 提交于 2019-12-13 02:39:22
问题 I'm using amCharts library (it's a JavaScript library for loading data in charts) to extract the data from mySQL database, and display it using a Stock Chart. I found a complete tutorial here: http://www.amcharts.com/tutorials/your-first-stock-chart/ They use static data that they have created in the code, however I want to use my own data by extracting it from database in JSON format. The PHP file to include: json_encode.php <?php include("data.php"); echo json_encode($rows); ?> The output

amCharts Stock Chart with multiple datasets not showing

耗尽温柔 提交于 2019-12-06 06:53:51
I went through the examples and docs of amCharts. Here is my problem: the chart is showing just a line and not two as defined in the 2 datasets: var chart; function createStockChart() { chart = new AmCharts.AmStockChart(); // DATASETS ////////////////////////////////////////// var dataSet = new AmCharts.DataSet(); chart.dataSets = [{ title: "XWD.TO", color: "#000000", fieldMappings: [ { fromField: "value", toField: "value" }, { fromField: "volume", toField: "volume" } ], dataProvider: chartData, categoryField: "date" }, { title: "portfolio-top-9-12-2015", color: "#FF0000", fieldMappings: [ {

Angular 2 and AmCharts

*爱你&永不变心* 提交于 2019-11-29 10:59:51
Does anybody have any idea on how to implement Amcharts into Angular2 (BETA)? I was trying to follow the path/pattern of this question however, I was pretty successful with charts.js, but unfortunately, I can't use charts.js,for my charting program. Since it seems like everything in Angular2 Beta is uncharted territory, I don't have a clue where to start? I mimicked the charts.js example above with no luck, no error. /// <reference path="../DefinitelyTyped/amcharts/AmCharts.d.ts" /> There is a DefinitelyTyped library for amcharts (not one for plot.ly yet). UPDATE: Here is the directive: ///

Angular 2 and AmCharts

爷,独闯天下 提交于 2019-11-28 04:09:13
问题 Does anybody have any idea on how to implement Amcharts into Angular2 (BETA)? I was trying to follow the path/pattern of this question however, I was pretty successful with charts.js, but unfortunately, I can't use charts.js,for my charting program. Since it seems like everything in Angular2 Beta is uncharted territory, I don't have a clue where to start? I mimicked the charts.js example above with no luck, no error. /// <reference path="../DefinitelyTyped/amcharts/AmCharts.d.ts" /> There is