国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

目錄
什么是思維導(dǎo)圖?
F6中如何繪制
支付寶中
微信中
歡迎討論
首頁(yè) 微信小程序 小程序開(kāi)發(fā) 什么是思維導(dǎo)圖?怎么使用F6在小程序中繪制思維導(dǎo)圖?

什么是思維導(dǎo)圖?怎么使用F6在小程序中繪制思維導(dǎo)圖?

Oct 18, 2021 am 11:26 AM
小程序 思維導(dǎo)圖

什么是思維導(dǎo)圖?怎么在小程序中繪制思維導(dǎo)圖?下面本篇文章給大家介紹一下使用F6在小程序中繪制思維導(dǎo)圖的方法,希望對(duì)大家有所幫助!

什么是思維導(dǎo)圖?怎么使用F6在小程序中繪制思維導(dǎo)圖?

什么是思維導(dǎo)圖?

思維導(dǎo)圖(英語(yǔ):mind map),又稱腦圖、心智地圖、頭腦風(fēng)暴圖、心智圖靈感觸發(fā)圖、概念地圖、或思維地圖,是一種用圖像整理信息的圖解。它用一個(gè)中央關(guān)鍵詞或想法以輻射線形連接所有的代表字詞、想法、任務(wù)或其它關(guān)聯(lián)項(xiàng)目。它可以利用不同的方式去表現(xiàn)人們的想法,如引題式、可見(jiàn)形象化式、建構(gòu)系統(tǒng)式和分類式。它普遍地用作在研究、組織、解決問(wèn)題和政策制定中。《維基百科》

思維導(dǎo)圖是由英國(guó)的托尼·博贊于1970年代提出的一種輔助思考工具。以目標(biāo)主題為中心節(jié)點(diǎn)不斷向外延展關(guān)聯(lián),不斷分解和探索,最終形成一張完整的樹(shù)狀圖。從具體的操作過(guò)程來(lái)看,也可以理解為對(duì)探索過(guò)程的可視化,完整記錄了每一次關(guān)聯(lián)的結(jié)果。這種形式更加符合人的思考方式,最后的圖也讓我們對(duì)主題更有體感和整體的了解。

1-2.gif

正因?yàn)樗季S導(dǎo)圖的關(guān)注點(diǎn)在于思考,而我們的正?;顒?dòng)離不開(kāi)思考,所以思維導(dǎo)圖有非常廣泛的使用場(chǎng)景。比如總結(jié)歸納、報(bào)告演示、頭腦風(fēng)暴等。實(shí)施起來(lái)只需要紙筆足以,當(dāng)然也有豐富的在線、獨(dú)立應(yīng)用可以支持到圖的制作。如果我們的產(chǎn)品需要展示圍繞一個(gè)主題的多層關(guān)聯(lián)信息的時(shí)候,便可以采用思維導(dǎo)圖的形式。F6可以很方便地在小程序中繪制腦圖,比如上圖的效果,有相關(guān)需求的同學(xué)值得一試?!鞠嚓P(guān)學(xué)習(xí)推薦:小程序開(kāi)發(fā)教程

F6中如何繪制

演示示例可以參考f6.antv.vision/zh/docs/exa…本節(jié)代碼已經(jīng)開(kāi)源,感興趣可以查看

支付寶中

首先安裝

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';

/**
 * 腦圖-自節(jié)點(diǎn)自動(dòng)兩側(cè)分布
 */

Page({
  canvas: null,
  ctx: null,
  renderer: '', // mini、mini-native等,F(xiàn)6需要,標(biāo)記環(huán)境
  isCanvasInit: false, // canvas是否準(zhǔn)備好了
  graph: null,

  data: {
    width: 375,
    height: 600,
    pixelRatio: 2,
    forceMini: false,
  },

  onLoad() {
    // 注冊(cè)自定義樹(shù),節(jié)點(diǎn)等
    F6.registerGraph('TreeGraph', TreeGraph);

    // 同步獲取window的寬高
    const { windowWidth, windowHeight, pixelRatio } = my.getSystemInfoSync();

    this.setData({
      width: windowWidth,
      height: windowHeight,
      pixelRatio,
    });
  },

  /**
   * 初始化cnavas回調(diào),緩存獲得的context
   * @param {*} ctx 繪圖context
   * @param {*} rect 寬高信息
   * @param {*} canvas canvas對(duì)象,在render為mini時(shí)為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派發(fā)的事件,轉(zhuǎn)派給graph實(shí)例
   */
  handleTouch(e) {
    this.graph && this.graph.emitEvent(e);
  },

  updateChart() {
    const { width, height, pixelRatio } = this.data;

    // 創(chuàng)建F6實(shí)例
    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禁止嵌套的三元表達(dá),所以單獨(dú)提取出來(lái)寫)
      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>

微信中

首先安裝

npm install @antv/f6-wx -S

@antv/f6-wx 由于微信對(duì)npm包不是很友好,所以我們分裝了 @antv/f6-wx 幫助用戶簡(jiǎn)化操作。

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 &#39;@antv/f6-wx&#39;;
import TreeGraph from &#39;@antv/f6-wx/extends/graph/treeGraph&#39;;


import data from &#39;./data&#39;;

/**
 * 腦圖-自節(jié)點(diǎn)自動(dòng)兩側(cè)分布
 */

Page({
  canvas: null,
  ctx: null,
  renderer: &#39;&#39;, // mini、mini-native等,F(xiàn)6需要,標(biāo)記環(huán)境
  isCanvasInit: false, // canvas是否準(zhǔn)備好了
  graph: null,

  data: {
    width: 375,
    height: 600,
    pixelRatio: 1,
    forceMini: false,
  },

  onLoad() {
    // 注冊(cè)自定義樹(shù),節(jié)點(diǎn)等
    F6.registerGraph(&#39;TreeGraph&#39;, TreeGraph);

    // 同步獲取window的寬高
    const { windowWidth, windowHeight, pixelRatio } = wx.getSystemInfoSync();

    this.setData({
      width: windowWidth,
      height: windowHeight,
      // pixelRatio,
    });
  },

  /**
   * 初始化cnavas回調(diào),緩存獲得的context
   * @param {*} ctx 繪圖context
   * @param {*} rect 寬高信息
   * @param {*} canvas canvas對(duì)象,在render為mini時(shí)為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派發(fā)的事件,轉(zhuǎn)派給graph實(shí)例
   */
  handleTouch(e) {
    this.graph && this.graph.emitEvent(e.detail);
  },

  updateChart() {
    const { width, height, pixelRatio } = this.data;

    // 創(chuàng)建F6實(shí)例
    this.graph = new F6.TreeGraph({
      context: this.ctx,
      renderer: this.renderer,
      width,
      height,
      pixelRatio,
      fitView: true,
      modes: {
        default: [
          {
            type: &#39;collapse-expand&#39;,
            onChange: function onChange(item, collapsed) {
              const model = item.getModel();
              model.collapsed = collapsed;
              return true;
            },
          },
          &#39;drag-canvas&#39;,
          &#39;zoom-canvas&#39;,
        ],
      },
      defaultNode: {
        size: 26,
        anchorPoints: [
          [0, 0.5],
          [1, 0.5],
        ],
      },
      defaultEdge: {
        type: &#39;cubic-horizontal&#39;,
      },
      layout: {
        type: &#39;mindmap&#39;,
        direction: &#39;H&#39;,
        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 === &#39;Modeling Methods&#39;) {
        centerX = node.x;
      }

      // position的取值(由于ESlint禁止嵌套的三元表達(dá),所以單獨(dú)提取出來(lái)寫)
      let position_value = null;
      if (node.children && node.children.length > 0) {
        position_value = &#39;left&#39;;
      } else if (node.x > centerX) position_value = &#39;right&#39;;
      else position_value = &#39;left&#39;;

      return {
        label: node.id,
        labelCfg: {
          offset: 5,
          position: position_value,
        },
      };
    });

    this.graph.data(data);
    this.graph.render();
    this.graph.fitView();
  },
});

歡迎討論

對(duì)于思維導(dǎo)圖,或者圖可視化感興趣,都可以添加我的微信 openwayne 進(jìn)入我們的微信群討論。

更多編程相關(guān)知識(shí),請(qǐng)?jiān)L問(wèn):編程入門?。?/p>

以上是什么是思維導(dǎo)圖?怎么使用F6在小程序中繪制思維導(dǎo)圖?的詳細(xì)內(nèi)容。更多信息請(qǐng)關(guān)注PHP中文網(wǎng)其他相關(guān)文章!

本站聲明
本文內(nèi)容由網(wǎng)友自發(fā)貢獻(xiàn),版權(quán)歸原作者所有,本站不承擔(dān)相應(yīng)法律責(zé)任。如您發(fā)現(xiàn)有涉嫌抄襲侵權(quán)的內(nèi)容,請(qǐng)聯(lián)系admin@php.cn

熱AI工具

Undress AI Tool

Undress AI Tool

免費(fèi)脫衣服圖片

Undresser.AI Undress

Undresser.AI Undress

人工智能驅(qū)動(dòng)的應(yīng)用程序,用于創(chuàng)建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用于從照片中去除衣服的在線人工智能工具。

Clothoff.io

Clothoff.io

AI脫衣機(jī)

Video Face Swap

Video Face Swap

使用我們完全免費(fèi)的人工智能換臉工具輕松在任何視頻中換臉!

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費(fèi)的代碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

功能強(qiáng)大的PHP集成開(kāi)發(fā)環(huán)境

Dreamweaver CS6

Dreamweaver CS6

視覺(jué)化網(wǎng)頁(yè)開(kāi)發(fā)工具

SublimeText3 Mac版

SublimeText3 Mac版

神級(jí)代碼編輯軟件(SublimeText3)

熱門話題

Laravel 教程
1601
29
PHP教程
1502
276
怎么用word做思維導(dǎo)圖-用word做思維導(dǎo)圖的方法 怎么用word做思維導(dǎo)圖-用word做思維導(dǎo)圖的方法 Mar 05, 2024 pm 08:22 PM

有很多朋友還不知道怎么用word做思維導(dǎo)圖,所以下面小編就講解了用word做思維導(dǎo)圖的方法,有需要的小伙伴趕緊來(lái)看一下吧,相信對(duì)大家一定會(huì)有所幫助哦。第一步:首先打開(kāi)Word,在菜單欄中,點(diǎn)擊插入(如圖所示)。第二步:點(diǎn)擊形狀圖標(biāo)(如圖所示)。第三步:點(diǎn)擊圓角矩形(如圖所示)。第四步:在文檔中繪制合適的圓角矩形(如圖所示)。第五步:在形狀中,點(diǎn)擊選擇曲線連接符圖標(biāo)(如圖所示)。第六步:使用曲線連接符將圓角矩形連接起來(lái)(如圖所示)。第七步:點(diǎn)擊選擇圓角矩形,輸入文字,這樣一張思維導(dǎo)圖就繪制好了(如

使用Python開(kāi)發(fā)微信小程序 使用Python開(kāi)發(fā)微信小程序 Jun 17, 2023 pm 06:34 PM

隨著移動(dòng)互聯(lián)網(wǎng)技術(shù)和智能手機(jī)的普及,微信成為了人們生活中不可或缺的一個(gè)應(yīng)用。而微信小程序則讓人們可以在不需要下載安裝應(yīng)用的情況下,直接使用小程序來(lái)解決一些簡(jiǎn)單的需求。本文將介紹如何使用Python來(lái)開(kāi)發(fā)微信小程序。一、準(zhǔn)備工作在使用Python開(kāi)發(fā)微信小程序之前,需要安裝相關(guān)的Python庫(kù)。這里推薦使用wxpy和itchat這兩個(gè)庫(kù)。wxpy是一個(gè)微信機(jī)器

實(shí)現(xiàn)微信小程序中的卡片翻轉(zhuǎn)特效 實(shí)現(xiàn)微信小程序中的卡片翻轉(zhuǎn)特效 Nov 21, 2023 am 10:55 AM

實(shí)現(xiàn)微信小程序中的卡片翻轉(zhuǎn)特效在微信小程序中,實(shí)現(xiàn)卡片翻轉(zhuǎn)特效是一種常見(jiàn)的動(dòng)畫(huà)效果,可以提升用戶體驗(yàn)和界面交互的吸引力。下面將具體介紹如何在微信小程序中實(shí)現(xiàn)卡片翻轉(zhuǎn)的特效,并提供相關(guān)代碼示例。首先,需要在小程序的頁(yè)面布局文件中定義兩個(gè)卡片元素,一個(gè)用于顯示正面內(nèi)容,一個(gè)用于顯示背面內(nèi)容,具體示例代碼如下:&lt;!--index.wxml--&gt;&l

支付寶上線'漢字拾光-生僻字”小程序,用于征集、補(bǔ)充生僻字庫(kù) 支付寶上線'漢字拾光-生僻字”小程序,用于征集、補(bǔ)充生僻字庫(kù) Oct 31, 2023 pm 09:25 PM

本站10月31日消息,今年5月27日,螞蟻集團(tuán)宣布啟動(dòng)“漢字拾光計(jì)劃”,最近又迎來(lái)新進(jìn)展:支付寶上線“漢字拾光-生僻字”小程序,用于向社會(huì)征集生僻字,補(bǔ)充生僻字庫(kù),同時(shí)提供不同的生僻字輸入體驗(yàn),以幫助完善支付寶內(nèi)的生僻字輸入方法。目前,用戶搜索“漢字拾光”、“生僻字”等關(guān)鍵詞就可以進(jìn)入“生僻字”小程序。在小程序里,用戶可以提交尚未被系統(tǒng)識(shí)別錄入的生僻字圖片,支付寶工程師在確認(rèn)后,將會(huì)對(duì)字庫(kù)進(jìn)行補(bǔ)錄入。本站注意到,用戶還可以在小程序體驗(yàn)最新的拆字輸入法,這一輸入法針對(duì)讀音不明確的生僻字設(shè)計(jì)。用戶拆

思維導(dǎo)圖怎么畫(huà) 怎樣用WPS軟件畫(huà)思維導(dǎo)圖 思維導(dǎo)圖怎么畫(huà) 怎樣用WPS軟件畫(huà)思維導(dǎo)圖 Feb 22, 2024 pm 03:04 PM

在WPS軟件中找到插入并點(diǎn)擊思維導(dǎo)圖就可以畫(huà)出了。解析1開(kāi)啟WPS手機(jī)軟件來(lái)到首頁(yè),點(diǎn)擊上面的插入,再點(diǎn)擊思維導(dǎo)圖。2彈出來(lái)面板,隨后單擊上面的新建空白思維導(dǎo)圖選項(xiàng)。33最后在頁(yè)面中畫(huà)出思維導(dǎo)圖,再點(diǎn)擊插入就可以展現(xiàn)出來(lái)了。補(bǔ)充:思維導(dǎo)圖是什么工具1思維腦圖,別名心智導(dǎo)圖,是表述發(fā)散性思維的有效的圖型創(chuàng)新思維工具,它簡(jiǎn)易卻又十分合理與此同時(shí)又十分高效率,是一種應(yīng)用性的創(chuàng)新思維工具??偨Y(jié)/注意事項(xiàng)在制作思維導(dǎo)圖時(shí),核心主題和核心圖型之間的關(guān)聯(lián)至關(guān)重要。它們之間的緊密聯(lián)系有助于促進(jìn)思維的流暢性和邏輯

小程序能用react嗎 小程序能用react嗎 Dec 29, 2022 am 11:06 AM

小程序能用react,其使用方法:1、基于“react-reconciler”實(shí)現(xiàn)一個(gè)渲染器,生成一個(gè)DSL;2、創(chuàng)建一個(gè)小程序組件,去解析和渲染DSL;3、安裝npm,并執(zhí)行開(kāi)發(fā)者工具中的構(gòu)建npm;4、在自己的頁(yè)面中引入包,再利用api即可完成開(kāi)發(fā)。

uniapp如何實(shí)現(xiàn)小程序和H5的快速轉(zhuǎn)換 uniapp如何實(shí)現(xiàn)小程序和H5的快速轉(zhuǎn)換 Oct 20, 2023 pm 02:12 PM

uniapp如何實(shí)現(xiàn)小程序和H5的快速轉(zhuǎn)換,需要具體代碼示例近年來(lái),隨著移動(dòng)互聯(lián)網(wǎng)的發(fā)展和智能手機(jī)的普及,小程序和H5成為了不可或缺的應(yīng)用形式。而uniapp作為一個(gè)跨平臺(tái)的開(kāi)發(fā)框架,可以在一套代碼的基礎(chǔ)上,快速實(shí)現(xiàn)小程序和H5的轉(zhuǎn)換,大大提高了開(kāi)發(fā)效率。本文將介紹uniapp如何實(shí)現(xiàn)小程序和H5的快速轉(zhuǎn)換,并給出具體的代碼示例。一、uniapp簡(jiǎn)介unia

教你如何在小程序中用公眾號(hào)模板消息(附詳細(xì)思路) 教你如何在小程序中用公眾號(hào)模板消息(附詳細(xì)思路) Nov 04, 2022 pm 04:53 PM

本篇文章給大家?guī)?lái)了關(guān)于微信小程序的相關(guān)問(wèn)題,其中主要介紹了如何在小程序中用公眾號(hào)模板消息,下面一起來(lái)看一下,希望對(duì)大家有幫助。

See all articles