You are not logged in.
I want each bullet to have a unique combination of color and bullet type.
This is my code:
var chartData = [
// scatter points
{
name: "Fred",
x: 96,
y: 78,
color: "#FF0F00",
bullet: "triangleUp"
}, {
name: "Ralph",
x: 35,
y: 50,
color: "#FF6600",
bullet: "triangleDown"
}, {
(etc.)
...
for (var i = 0; i < chartData.length; i++){
var graph1 = new AmCharts.AmGraph();
graph1.colorField = "color"; // color works
graph1.balloonText = "[[name]] x:[[x]] y:[[y]]"; // name does not appear, x and y do
graph1.xField = "x";
graph1.yField = "y";
graph1.lineAlpha = 0;
graph1.bullet = "bullet"; // I only get a graph if I set bullet to "bubble", etc. here.
// then all of my bullets are the same type
chart.addGraph(graph1);
}What am I doing wrong, and how can I get a legend of the names and bullets?
Thanks,
John
Offline
You need to tell graph which field in your data is holding bullet:
graph1.bulletField = "bullet";
The legend does not support graph bullets though.
Offline
Thanks!
How can I get the name to appear?
John
Offline
Use descriptionField for that:
graph.descriptionField = "name"; graph.balloonText = "[[description]] x:[[x]] y:[[y]]";
Offline
© amCharts | Forum engine: PunBB