93
rated 0 times
[
96]
[
3]
/ answers: 1 / hits: 19170
/ 10 Years ago, fri, april 11, 2014, 12:00:00
I'm still strugling making work other libs with AngularJS because of it's differtent logic from other libs.
I need to visualize data with amCharts Stock, but there is nothing on the internet about these two wroking together.
How can i make this work with angularjs: http://jsfiddle.net/922JW/
var chart = AmCharts.makeChart(chartdiv, {
type: stock,
theme: none,
pathToImages: http://www.amcharts.com/lib/3/images/,
categoryAxesSettings: {
minPeriod: mm
},
dataSets: [{
color: #b0de09,
fieldMappings: [{
fromField: value,
toField: value
}, {
fromField: volume,
toField: volume
}],
dataProvider: chartData,
categoryField: date
}],
panels: [{
showCategoryAxis: false,
title: Value,
percentHeight: 70,
stockGraphs: [{
id: g1,
valueField: value,
type: smoothedLine,
lineThickness: 2,
bullet: round
}],
stockLegend: {
valueTextRegular: ,
markerType: none
}
},
{
title: Volume,
percentHeight: 30,
stockGraphs: [{
valueField: volume,
type: column,
cornerRadiusTop: 2,
fillAlphas: 1
}],
stockLegend: {
valueTextRegular: ,
markerType: none
}
}
],
chartScrollbarSettings: {
graph: g1,
usePeriod: 10mm,
position: top
},
chartCursorSettings: {
valueBalloonsEnabled: true
},
periodSelector: {
position: top,
dateFormat: YYYY-MM-DD JJ:NN,
inputFieldWidth: 150,
periods: [{
period: hh,
count: 1,
label: 1 hour,
selected: true
}, {
period: hh,
count: 2,
label: 2 hours
}, {
period: hh,
count: 5,
label: 5 hour
}, {
period: hh,
count: 12,
label: 12 hours
}, {
period: MAX,
label: MAX
}]
},
panelsSettings: {
usePrefixes: true
}
});
Thanks.
More From » angularjs