Ich verwende Amchart's Seriendiagramm in ionischen Rahmen. Ich habe die serielle ChartAmchart Serial Chart Seite wird eingefroren, wenn in Ionic
var chart = AmCharts.makeChart("chartdiv",
{
"type": "serial",
"categoryField": "Name",
"rotate": true,
"angle": 30,
"depth3D": 40,
"startDuration": 1,
"fontSize": 10,
"theme": "default",
"precision": 4,
"creditsPosition": "bottom-right",
"responsive": {
"enabled": true
},
"categoryAxis": {
"gridPosition": "middle",
"title": "Name",
"inside": true
},
"graphs": [
{
"balloonText": "[[title]] of [[Name]]:[[value]]",
"fillAlphas": 1,
"id": "AmGraph-1",
"title": "X",
"type": "column",
"valueField": "X"
},
{
"balloonText": "[[title]] of [[Name]]:[[value]]",
"fillAlphas": 1,
"id": "AmGraph-2",
"title": "Y",
"type": "column",
"valueField": "Y"
},
{
"balloonText": "[[title]] of [[Name]]:[[value]]",
"fillAlphas": 1,
"id": "AmGraph-3",
"title": "Z",
"type": "column",
"valueField": "Z"
}
],
"valueAxes": [
{
"id": "ValueAxis-1",
"title": "Amount"
}
],
"titles": [
{
"id": "Title-1",
"text": "SUMMARY"
}
],
"legend": {
"enabled": true,
"useGraphSettings": true,
"position": "bottom"
},
"dataProvider": $scope.data,
"listeners": [{
"event": "clickGraphItem",
"method": function (event) {
$scope.SelectedX = event.item.category;
$scope.SelectedContext = event.item.dataContext;
$scope.LoadDetailsData($scope.SelectedX, $scope.SelectedContext.Period);
}
}]
}
);
chart.addListener("dataUpdated", zoomChart);
zoomChart();
function zoomChart() {
chart.zoomToIndexes(0, chart.dataProvider.length - (chart.dataProvider.length - 3));
}
ich auf Klick Chart Artikel am Öffnen IonicModal mit gerendert und ein weiteres Diagramm erstellen. Wenn ich das IonicModal schließe, wird die Seite, die das obige Diagramm enthält, eingefroren, bis ich die Hardware-Zurück-Taste drücke.
Ich benutze Tortendiagramme einige Orte, aber nicht auf diesen Seiten mit diesem Problem konfrontiert. Es scheint nur ein Problem mit dem seriellen Diagramm zu bestehen.
Mit IonicModal von Optionsschablone URL Modal öffnen -
$ionicModal.fromTemplateUrl('template.html', { scope: $scope })
.then(function (modal) {
$scope.sortModal = modal;
});
$scope.sortShow = function() {
//alert('inside show');
$timeout(function() {
$scope.sortModal.show();
$scope.LoadDetailsChart(); //creating next chart data
}, 0);
};
$scope.sortClose = function() {
$scope.sortModal.hide();
};
$scope.$on('$destroy', function() {
$scope.sortModal.remove();
});
Bitte geben Sie jede Plunker URL für die gleiche. –
Ich habe keinen Plünderer dafür geschaffen. Ich kann hier Code schreiben. – Raj
Ein Plucker/Geige, die das reproduziert, würde wirklich helfen. Wie viele Datenpunkte befinden sich in Ihrem seriellen Diagramm? – xorspark