Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Annotations can be represented as Text or Images in combination with shapes such as arc, circle, rectangle, and line. A sample JSON to display a text with a circle is as follows:


Image RemovedImage Added

Sample JSONs:


Code Block
languageactionscript3
To print text: 
{"annotationConfig":
[{
	"type": "text",
	"textcolor": "#AED6F1",
	"textbgcolor": "#A9E96C",
	"text": "pre-profit",
	"labelAlign": "top",
	"value": "80,000",
	"hposition": "right",
	"vposition": "bottom",
	"fontsize": "20",
	"wrapText": true,
	"id": "tt2"
}]
}


Code Block
To print image:

{"annotationConfig":
[{
	"type": "image",
	"id": "img1",
	"hposition": "left",
	"vposition": "top",
	"url": "images/4.png",
	"width": "150",
	"height": "250"
}]
}


Code Block
To print arc:
{"annotationConfig":
[{
	"type": "arc",
	"textcolor": "#AED6F1",
	"startAngle": "0",
	"endAngle": "270",
	"radius": "30",
	"innerRadius": "25",
	"hposition": "right",
	"vposition": "middle",
	"fontsize": "20",
	"id": "tt1"
}]
}


Code Block
To print circle:
{"annotationConfig":
[{
	"type": "circle",
	"radius": "10",
	"textcolor": "#AED6F1",
	"textbgcolor": "#ffffff",
	"hposition": "right",
	"vposition": "top"
}]
}


Code Block
To print rectangle/line:
{"annotationConfig":
[{
	"type": "rectangle/line",
	"textcolor": "#AED6F1",
	"hposition": "left_corner",
	"vposition": "middle",
	"h1position": "middle",
	"v1position": "middle",
	"fontsize": "20",
	"id": "tt21"
}]


Code Block
To Print Polygon:
{
	"type": "polygon",
	"radius": "20",
	"textcolor": "#AED6F1",
	"textbgcolor": "#ffffff",
	"hposition": "left",
	"vposition": "bottom",
	"sides": ">2"
} 

...