问题描述:

I would like to add a ui-grid/ng-grid to my d3 donut chart when i click it. does anyone have examples of this? I have a controller for my ng-grid:

(function () {

angular.module('App.layout', ['ngGrid'])

.controller('GridController', function ($scope, $http) {

$http.get('mockdata.json').success(function (thisdata) {

$scope.mydata = [thisdata];

});

//filter options

$scope.filterOptions = {

filterText: '',

useExternalFilter: true

};

//Setting grid options

$scope.gridOptions = {

data: 'mydata',

multiSelect: true,

filterOptions: { filterText: '', useExternalFilter: false },

enableRowReordering: false,

showGroupPanel: false,

maintainColumnRatios: false,

groups: [],

showSelectionCheckbox: true,

showFooter: true,

enableColumnResize: true,

enableColumnReordering: true

};

});

});

and want to get the grid to popup when I click the chart piece:

.on("click", function (d) {

d3.select(this)

.append(grid);

});

相关阅读:
Top