| 44 | |
| 45 | export class GraphModel extends MarkModel { |
| 46 | defaults() { |
| 47 | return { |
| 48 | ...MarkModel.prototype.defaults(), |
| 49 | _model_name: 'GraphModel', |
| 50 | _view_name: 'Graph', |
| 51 | node_data: [], |
| 52 | link_matrix: [], |
| 53 | link_data: [], |
| 54 | charge: -600, |
| 55 | static: false, |
| 56 | link_distance: 100, |
| 57 | link_type: 'arc', |
| 58 | directed: true, |
| 59 | highlight_links: true, |
| 60 | colors: d3.scaleOrdinal(d3.schemeCategory10).range(), |
| 61 | x: [], |
| 62 | y: [], |
| 63 | color: null, |
| 64 | link_color: null, |
| 65 | hovered_point: null, |
| 66 | scales_metadata: { |
| 67 | x: { orientation: 'horizontal', dimension: 'x' }, |
| 68 | y: { orientation: 'vertical', dimension: 'y' }, |
| 69 | color: { dimension: 'color' }, |
| 70 | }, |
| 71 | }; |
| 72 | } |
| 73 | |
| 74 | initialize(attributes, options) { |
| 75 | super.initialize(attributes, options); |