0.6.6 • Published 1 year ago

hbp-connectivity-component v0.6.6

Weekly downloads
36
License
MIT
Repository
-
Last release
1 year ago

HBP Connectivity browser component

HBP connectivity component is a component built with StencilJS to display and export a connectivity matrix in a 3D brain volume viewer. There are 2 core components: 1. hbp-connectivity-matrix-row - visualizes the connection strengths from a single source region as a bar chart. 2. export-connectivity-diagram - exports the connectivity matrix. This functionality is automatically imported in "hbp-connectivity-matrix-row". To enable, set "show-export="true"" in "hbp-connectivity-matrix-row"

Example use

<hbp-connectivity-matrix-row -> Create component
        region="region name" -> Set source region name 
        theme="light" -> Set theme (There are 2 light and dark themes. default theme is dark.)
        loadurl="https://example.com" -> Set source url of connectivity data (It will hardcoded in component soon)
        show-export="true" -> Show export area
        show-source="true" -> Show source component
        show-title="true" -> Show title
        show-toolbar="true"> -> Show toolbar ("log10", "show all results"...)  
        customDatasetSelector="true" -> Enable custom dataset and show dataset details
        customHeight="100px" -> Set custom height of component
        customWidth="100px" -> Set custom width of component        
        datasetUrl="https://example.com" -> Set dataset url to get details about dataset"             
        showDatasetName="true" -> Show Dataset name
        show-description="true" -> Show Dataset description
    <div slot="header"></div> -> Send HTML to set custom header
    <div slot="connectedRegionMenu"></div> -> Sent HTML to set any content under connected area after user clicks
</hbp-connectivity-matrix-row>

Importing the component in your application

Angular 2+ application

  1. Install npm package -

    npm install hbp-connectivity-component --save

  2. Import "CUSTOM_ELEMENTS_SCHEMA" from angular core to main module of application

    import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";

  3. Add "CUSTOM_ELEMENTS_SCHEMA" in schemas in main module

    schemas: CUSTOM_ELEMENTS_SCHEMA

  4. Import "defineCustomElements" from "hbp-connectivity-component/dist/loader" into main.ts file main.ts

    import {defineCustomElements} from 'hbp-connectivity-component/dist/loader'

  5. Use "defineCustomElements" in main.ts file
    main.ts

    defineCustomElements(window)

  6. Done! component is available in application you can use it with tag:

#API

hbp-connectivity-matrix-row

Properties

PropertyAttributeDescriptionTypeDefault
customDatasetSelectorcustom-dataset-selectorShow dataset info if dataset selector is enabledstring''
customHeightcustom-heightSet custom height (Component will dynamically re-render on attribute change)string''
customWidthcustom-widthSet custom width (Component will dynamically re-render on attribute change)string''
datasetUrldataset-urlSet URL to get dataset infostring''
loadurlloadurlSet URL to load connectivity datastring''
regionregionSet source region of connectivity (Component will dynamically re-render on attribute change)string''
showDatasetNameshow-dataset-nameShow dataset name (Set 'true' to enable)string''
showDescriptionshow-descriptionShow dataset description (Set 'true' to enable)string''
showExportshow-exportShow connectivity export panel (Set 'true' to enable)string''
showSourceshow-sourceShow source region name (Set 'true' to enable)string''
showTitleshow-titleShow title (Set 'true' to enable)string''
showToolbarshow-toolbarShow toolbar (Set 'true' to enable) (toolbar contains checkbox to show logarithmic data and show all results on diagram)string''
themethemeSet theme ('dark' or 'light') (Component will dynamically re-render on attribute change)string''

Events

EventDescriptionType
collapsedMenuChangedEvent emits on connected area mouse clickCustomEvent<any>
connectivityDataReceivedEvent emits when connectivity data will initializedCustomEvent<any>
datasetDataReceivedEvent emits when dataset information will initializedCustomEvent<any>

Dependencies

Depends on

Graph

graph TD;
  hbp-connectivity-matrix-row --> export-connectivity-diagram
  style hbp-connectivity-matrix-row fill:#f9f,stroke:#333,stroke-width:4px

export-connectivity-diagram component

Properties

PropertyAttributeDescriptionType
connectedAreasconnected-areasConnected areas to export as csvany
elelelement to export as pngany
themethemeSet theme ('dark' or 'light')string

Methods

downloadPng() => Promise<void>

Returns

Type: Promise<void>

getCSVData() => Promise<unknown>

Returns

Type: Promise<unknown>

Dependencies

Used by

Graph

graph TD;
  hbp-connectivity-matrix-row --> export-connectivity-diagram
  style export-connectivity-diagram fill:#f9f,stroke:#333,stroke-width:4px

0.6.6

1 year ago

0.6.3

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.2

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.10

3 years ago

0.4.9

3 years ago

0.4.8

3 years ago

0.4.5

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.4

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.3.18

3 years ago

0.3.17

3 years ago

0.3.16

3 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.9

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.2.2

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.30

4 years ago

0.0.29

4 years ago

0.0.27

4 years ago

0.0.28

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago