マインドマップとは何ですか?ミニプログラムでマインドマップを描くには?次の記事では、F6 キーを使用して小さなプログラムでマインド マップを描画する方法を紹介します。
マインドマップとは何ですか?
マインド マップ (英語: マインド マップ)、ブレイン マップ、マインド マップ、ブレインストーミング画像とも呼ばれます、マインド マップ、インスピレーション トリガー マップ、コンセプト マップ、または シンキング マップは、画像を使用して情報を整理する方法です。図。中心となるキーワードやアイデアを使用して、すべての代表的な単語、アイデア、タスク、その他の関連項目を放射状に接続します。見積書型、可視化型、構築システム型、分類型など、さまざまな手法で人のアイデアを表現できます。研究、組織化、問題解決、政策策定によく使われます。 「ウィキペディア」
マインドマップは、1970年代にイギリスのトニー・ブザンによって提案された補助的な思考ツールです。対象となるテーマを中心ノードとして、関係が継続的に外側に拡張され、分解され、探索され、最終的に完全な樹形図が形成されます。具体的な運用プロセスの観点から見ると、各関連付けの結果を完全に記録する探索プロセスの可視化としても理解できます。この形式は人々の考え方により一致しており、最終的な図は主題についてより物理的かつ全体的な理解を与えてくれます。
マインド マップの焦点は思考であり、私たちの通常の活動は思考と切り離せないものであるため、マインド マップの使用シーンは非常に幅広いです。まとめ、レポート発表、ブレインストーミングなど。これを実装するには、ペンと紙だけで十分ですが、図の作成をサポートできるさまざまなオンラインアプリケーションや独立したアプリケーションももちろんあります。製品がトピックに関する関連情報を複数のレイヤーで表示する必要がある場合は、マインド マップを使用できます。 F6 を使用すると、上の図の効果など、小さなプログラムで脳マップを簡単に描画できます。関連するニーズを持つ学生は試してみる価値があります。 [関連する学習の推奨事項: 小さなプログラム開発チュートリアル ]
F6 で描画する方法
デモ例は f6.antv.vision/zh/docs を参照してください。 /exa …このセクションのコードはオープンソース化されています。興味がある場合は、チェックしてみてください。
- Alipaygithub.com/antvis/F6/t…
- WeChat github.com/antvis/F6/t…
Alipay で
最初のインストール
npm install @antv/f6 @antv/f6-alipay -S
data.js
export default { id: 'Modeling Methods', children: [ { id: 'Classification', children: [ { id: 'Logistic regression', }, { id: 'Linear discriminant analysis', }, { id: 'Rules', }, { id: 'Decision trees', }, { id: 'Naive Bayes', }, { id: 'K nearest neighbor', }, { id: 'Probabilistic neural network', }, { id: 'Support vector machine', }, ], }, { id: 'Consensus', children: [ { id: 'Models diversity', children: [ { id: 'Different initializations', }, { id: 'Different parameter choices', }, { id: 'Different architectures', }, { id: 'Different modeling methods', }, { id: 'Different training sets', }, { id: 'Different feature sets', }, ], }, { id: 'Methods', children: [ { id: 'Classifier selection', }, { id: 'Classifier fusion', }, ], }, { id: 'Common', children: [ { id: 'Bagging', }, { id: 'Boosting', }, { id: 'AdaBoost', }, ], }, ], }, { id: 'Regression', children: [ { id: 'Multiple linear regression', }, { id: 'Partial least squares', }, { id: 'Multi-layer feedforward neural network', }, { id: 'General regression neural network', }, { id: 'Support vector regression', }, ], }, ], };
index .json
{ "defaultTitle": "mindMap", "usingComponents": { "f6-canvas": "@antv/f6-alipay/es/container/container" } }
index.js
import F6 from '@antv/f6'; import TreeGraph from '@antv/f6/dist/extends/graph/treeGraph'; import { wrapContext } from '../../../common/utils/context'; import data from './data'; /** * 脑图-自节点自动两侧分布 */ Page({ canvas: null, ctx: null, renderer: '', // mini、mini-native等,F6需要,标记环境 isCanvasInit: false, // canvas是否准备好了 graph: null, data: { width: 375, height: 600, pixelRatio: 2, forceMini: false, }, onLoad() { // 注册自定义树,节点等 F6.registerGraph('TreeGraph', TreeGraph); // 同步获取window的宽高 const { windowWidth, windowHeight, pixelRatio } = my.getSystemInfoSync(); this.setData({ width: windowWidth, height: windowHeight, pixelRatio, }); }, /** * 初始化cnavas回调,缓存获得的context * @param {*} ctx 绘图context * @param {*} rect 宽高信息 * @param {*} canvas canvas对象,在render为mini时为null * @param {*} renderer 使用canvas 1.0还是canvas 2.0,mini | mini-native */ handleInit(ctx, rect, canvas, renderer) { this.isCanvasInit = true; this.ctx = wrapContext(ctx); this.renderer = renderer; this.canvas = canvas; this.updateChart(); }, /** * canvas派发的事件,转派给graph实例 */ handleTouch(e) { this.graph && this.graph.emitEvent(e); }, updateChart() { const { width, height, pixelRatio } = this.data; // 创建F6实例 this.graph = new F6.TreeGraph({ context: this.ctx, renderer: this.renderer, width, height, pixelRatio, fitView: true, modes: { default: [ { type: 'collapse-expand', onChange: function onChange(item, collapsed) { const model = item.getModel(); model.collapsed = collapsed; return true; }, }, 'drag-canvas', 'zoom-canvas', ], }, defaultNode: { size: 26, anchorPoints: [ [0, 0.5], [1, 0.5], ], }, defaultEdge: { type: 'cubic-horizontal', }, layout: { type: 'mindmap', direction: 'H', getHeight: function getHeight() { return 16; }, getWidth: function getWidth() { return 16; }, getVGap: function getVGap() { return 10; }, getHGap: function getHGap() { return 50; }, }, }); let centerX = 0; this.graph.node(function(node) { if (node.id === 'Modeling Methods') { centerX = node.x; } // position的取值(由于ESlint禁止嵌套的三元表达,所以单独提取出来写) let position_value = null; if (node.children && node.children.length > 0) { position_value = 'left'; } else if (node.x > centerX) position_value = 'right'; else position_value = 'left'; return { label: node.id, labelCfg: { offset: 5, position: position_value, }, }; }); this.graph.data(data); this.graph.render(); this.graph.fitView(); }, });
index.axml
<f6-canvas width="{{width}}" height="{{height}}" forceMini="{{forceMini}}" pixelRatio="{{pixelRatio}}" onTouchEvent="handleTouch" onInit="handleInit" ></f6-canvas>
WeChat で
最初にinstall
npm install @antv/f6-wx -S
@ antv/f6-wx
WeChat は npm パッケージにあまり適していないため、ユーザーが操作を簡素化できるように @antv/f6-wx
を再パッケージしました。 。
data.js 同上
index.json
{ "defaultTitle": "脑图", "usingComponents": { "f6-canvas": "@antv/f6-wx/canvas/canvas" } }
index.wxml
<f6-canvas width="{{width}}" height="{{height}}" forceMini="{{forceMini}}" pixelRatio="{{pixelRatio}}" bind:onTouchEvent="handleTouch" bind:onInit="handleInit" ></f6-canvas>
index.js
import F6 from '@antv/f6-wx'; import TreeGraph from '@antv/f6-wx/extends/graph/treeGraph'; import data from './data'; /** * 脑图-自节点自动两侧分布 */ Page({ canvas: null, ctx: null, renderer: '', // mini、mini-native等,F6需要,标记环境 isCanvasInit: false, // canvas是否准备好了 graph: null, data: { width: 375, height: 600, pixelRatio: 1, forceMini: false, }, onLoad() { // 注册自定义树,节点等 F6.registerGraph('TreeGraph', TreeGraph); // 同步获取window的宽高 const { windowWidth, windowHeight, pixelRatio } = wx.getSystemInfoSync(); this.setData({ width: windowWidth, height: windowHeight, // pixelRatio, }); }, /** * 初始化cnavas回调,缓存获得的context * @param {*} ctx 绘图context * @param {*} rect 宽高信息 * @param {*} canvas canvas对象,在render为mini时为null * @param {*} renderer 使用canvas 1.0还是canvas 2.0,mini | mini-native */ handleInit(event) { const {ctx, rect, canvas, renderer} = event.detail this.isCanvasInit = true; this.ctx = ctx; this.renderer = renderer; this.canvas = canvas; this.updateChart(); }, /** * canvas派发的事件,转派给graph实例 */ handleTouch(e) { this.graph && this.graph.emitEvent(e.detail); }, updateChart() { const { width, height, pixelRatio } = this.data; // 创建F6实例 this.graph = new F6.TreeGraph({ context: this.ctx, renderer: this.renderer, width, height, pixelRatio, fitView: true, modes: { default: [ { type: 'collapse-expand', onChange: function onChange(item, collapsed) { const model = item.getModel(); model.collapsed = collapsed; return true; }, }, 'drag-canvas', 'zoom-canvas', ], }, defaultNode: { size: 26, anchorPoints: [ [0, 0.5], [1, 0.5], ], }, defaultEdge: { type: 'cubic-horizontal', }, layout: { type: 'mindmap', direction: 'H', getHeight: function getHeight() { return 16; }, getWidth: function getWidth() { return 16; }, getVGap: function getVGap() { return 10; }, getHGap: function getHGap() { return 50; }, }, }); let centerX = 0; this.graph.node(function(node) { if (node.id === 'Modeling Methods') { centerX = node.x; } // position的取值(由于ESlint禁止嵌套的三元表达,所以单独提取出来写) let position_value = null; if (node.children && node.children.length > 0) { position_value = 'left'; } else if (node.x > centerX) position_value = 'right'; else position_value = 'left'; return { label: node.id, labelCfg: { offset: 5, position: position_value, }, }; }); this.graph.data(data); this.graph.render(); this.graph.fitView(); }, });
議論へようこそ
心のためにグラフの視覚化に興味がある場合は、私の WeChat 番号 openwayne
を追加して、WeChat グループ ディスカッションに参加してください。
プログラミング関連の知識について詳しくは、プログラミング入門をご覧ください。 !
以上がマインドマップとは何ですか?ミニ プログラムで F6 キーを使用してマインド マップを描画するにはどうすればよいですか?の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

SecLists
SecLists は、セキュリティ テスターの究極の相棒です。これは、セキュリティ評価中に頻繁に使用されるさまざまな種類のリストを 1 か所にまとめたものです。 SecLists は、セキュリティ テスターが必要とする可能性のあるすべてのリストを便利に提供することで、セキュリティ テストをより効率的かつ生産的にするのに役立ちます。リストの種類には、ユーザー名、パスワード、URL、ファジング ペイロード、機密データ パターン、Web シェルなどが含まれます。テスターはこのリポジトリを新しいテスト マシンにプルするだけで、必要なあらゆる種類のリストにアクセスできるようになります。

PhpStorm Mac バージョン
最新(2018.2.1)のプロフェッショナル向けPHP統合開発ツール

WebStorm Mac版
便利なJavaScript開発ツール

メモ帳++7.3.1
使いやすく無料のコードエディター

DVWA
Damn Vulnerable Web App (DVWA) は、非常に脆弱な PHP/MySQL Web アプリケーションです。その主な目的は、セキュリティ専門家が法的環境でスキルとツールをテストするのに役立ち、Web 開発者が Web アプリケーションを保護するプロセスをより深く理解できるようにし、教師/生徒が教室環境で Web アプリケーションを教え/学習できるようにすることです。安全。 DVWA の目標は、シンプルでわかりやすいインターフェイスを通じて、さまざまな難易度で最も一般的な Web 脆弱性のいくつかを実践することです。このソフトウェアは、

ホットトピック









