anychart.onDocumentReady(function () {
// create data var data = [ ["August 2018", 3], ["September 2018", 4], ["October 2018", 4], ["November 2018", 7], ["December 2018", 6], ["January 2019", 12], ["February 2019", 18], ["March 2019", 19], ["April 2019", 19],
];
// create a chart var chart = anychart.line();
chart.background({fill: "#dbdbdb 3.5"}); // set chart padding chart.padding([10, 20, 5, 20]);
// turn on the crosshair chart.crosshair(true); chart.crosshair().xLabel(false);
// create a line series and set the data var series = chart.line(data);
series.normal().stroke("#0066cc", 3);
var title = chart.title(); title.enabled(true); title.width(800); title.text('Number of Attacks per Month'+''); chart.title().useHtml(true);
// Set horizontal align. title.hAlign('left'); title.fontColor('black'); title.fontWeight('bold'); title.fontFamily("Tahoma");
var xAxisLabels = chart.xAxis().labels(); xAxisLabels.rotation(-90) xAxisLabels.fontWeight("bold"); xAxisLabels.fontColor("black"); xAxisLabels.fontFamily("Tahoma"); xAxisLabels.letterSpacing('1px');
var yAxisLabels = chart.yAxis().labels(); yAxisLabels.fontWeight("bold"); yAxisLabels.fontColor("black"); yAxisLabels.fontFamily("Tahoma"); yAxisLabels.letterSpacing('1px');
// set the titles of the axes var xAxis = chart.xAxis(); var yAxis = chart.yAxis(); yAxis.title("Number of Arrests");
chart.yScale().maximum(20);
// add style to Y Axis & X Axis chart.yAxis(0).title().fontColor("black").fontWeight(900);
chart.xAxis(0).title().fontColor("black").fontWeight(900); // add bold to lables chart.labels().fontColor('black').fontWeight(900);
chart.xGrid().enabled(true); chart.yGrid().enabled(true);
chart.xMinorGrid().enabled(true); chart.yMinorGrid().enabled(true);
// third marker
// enable series data labels series.labels() .enabled(true) .anchor('left-bottom') .padding(5); // enable series markers series.markers(true);
//tooltip var tooltip = series.tooltip(); chart.tooltip(true);
chart.tooltip().useHtml(true); chart.tooltip().format("{%value}");
// remove two element from the menu chart.contextMenu().itemsFormatter(function(items){ // Disable save as image option delete items["save-chart-as"];
// delete about and separator delete items["full-screen-separator"]; delete items["about"];
// return modified array return items; });
// set the container id chart.container("timeline1");
// initiate drawing the chart
chart.draw();
});
anychart.onDocumentReady(function () { // create pie chart with passed data var data = [ {x: "Unknown actors", value: 25, fill:"#3B6891"}, {x: "ISIS cells", value: 16, fill:"#6FA2D7"}, {x: "Hay’at Tahrir Al-Sham", value: 9, fill:"#6FA2D7"}, {x: "Jund Al-Muntaqim group", value: 9, fill:"#4D85B8"}, {x: "Ahrar al-Sham", value: 7, fill:"#B8CDE8"}, {x: "5th Crops", value: 5, fill:"#3A668D"}, {x: "4 th Division Security Bureau", value: 4, fill:"#3A6790"}, {x: "Israeli Army", value: 2, fill:"#5591C7"}, {x: "Military Intelligence", value: 2, fill:"#4679A8"}, {x: "Abu Fadi Al-Saydali", value: 1, fill:"#4679A8"}, {x: "Air Force Intelligence", value: 1, fill:"#A2BCE4"}, {x: "Smuggling groups", value: 1, fill:"#3A6993"}
];
// create a chart and set the data var chart = anychart.pie(data);
chart.labels({fontColor: '#000000', position: 'outside', fontWeight: 'bold'}); chart.labels()
chart.startAngle(-40);
// Set critical angle. chart.outsideLabelsCriticalAngle(160); chart.connectorStroke({color: "#595959", thickness: 2, solid:"2 2"});
var title = chart.title(); title.enabled(true); title.width(800); title.text('Percentage of Attacks By Perpetrators'+''); chart.title().useHtml(true);
// Set horizontal align. title.hAlign('left'); title.fontColor('black'); title.fontWeight('bold'); title.fontFamily("Tahoma");
chart.minHeight('100%'); chart.maxHeight('100%'); chart.minWidth('100%'); chart.maxWidth('100%');
chart.height('100%');
var label = chart.label();
label.text('Please hover on Pie to see more details'); label.fontColor('black'); label.fontSize('10px'); label.position('center-top'); label.padding(10);
// set points grouping settings chart.background({fill: "#dbdbdb 3.5"});
chart.legend(false); chart.animation(true, 3000); // remove two element from the menu chart.contextMenu().itemsFormatter(function(items){ // Disable save as image option delete items["save-chart-as"];
// delete about and separator delete items["full-screen-separator"]; delete items["about"];
// return modified array return items; });
var outline = chart.outline();
outline.width('3px');
// set container id for the chart chart.container('pie1'); // initiate chart drawing chart.draw();
});
anychart.onDocumentReady(function () { // create pie chart with passed data var data = [ {x: "Air force Intelligence", value: 26, fill:"#4473C5"}, {x: "Military Intelligence", value: 22, fill:"#255F91"}, {x: "Syrian Arab Army", value: 11, fill:"#3359A0"}, {x: "State Security", value: 8, fill:"#3359A0"}, {x: "4th Division’s Security Bureau", value:6, fill:"#848484"}, {x: "Government institutions", value: 5, fill:"#5A9BD5"}, {x: "Hezbollah militia", value: 5, fill:"#264478"}, {x: "ISIS cells", value: 3, fill:"#636363"}, {x: "Political Security", value: 2, fill:"#688ECF"}, {x: "5th Crops", value: 2, fill:"#688ECF"}, {x: "Reconciliation Committees", value: 1, fill:"#B7B7B7"}, {x: "Criminal Security", value: 1, fill:"#A5A5A5"}
];
// create a chart and set the data var chart = anychart.pie(data);
chart.labels({fontColor: '#000000', position: 'outside', fontWeight: 'bold'}); chart.labels()
chart.startAngle(-40); chart.connectorLength(50);
// Set critical angle. chart.outsideLabelsCriticalAngle(160); chart.connectorStroke({color: "#595959", thickness: 2, solid:"2 2"});
var title = chart.title(); title.enabled(true); title.width(800); title.text('Percentage of Attacks By Target’s Affiliation'+''); chart.title().useHtml(true);
// Set horizontal align. title.hAlign('left'); title.fontColor('black'); title.fontWeight('bold'); title.fontFamily("Tahoma");
chart.minHeight('100%'); chart.maxHeight('100%'); chart.minWidth('100%'); chart.maxWidth('100%');
chart.height('100%');
var label = chart.label();
label.text('Please hover on Pie to see more details'); label.fontColor('black'); label.fontSize('10px'); label.position('center-top'); label.padding(10);
// set points grouping settings chart.background({fill: "#dbdbdb 3.5"});
chart.legend(false); chart.animation(true, 3000); // remove two element from the menu chart.contextMenu().itemsFormatter(function(items){ // Disable save as image option delete items["save-chart-as"];
// delete about and separator delete items["full-screen-separator"]; delete items["about"];
// return modified array return items; });
var outline = chart.outline();
outline.width('3px');
// Set stroke. chart.stroke({color: '#FFF', thickness: 0.5}); // set container id for the chart chart.container('test5'); // initiate chart drawing chart.draw();
});