-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
2,109 additions
and
111 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
5.42342452 | ||
6 | ||
-7.234234 | ||
2e2 | ||
2e-2 | ||
5 | ||
6 | ||
7 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-3;9 | ||
-2.5;6.25 | ||
-2;4 | ||
-1.5;2.25 | ||
-1;1 | ||
-0.5;0.25 | ||
0;0 | ||
0.5;0.25 | ||
1;1 | ||
1.5;2.25 | ||
2;4 | ||
2.5;6.25 | ||
3;9 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
Installation | ||
# ⚒️ Installation | ||
|
||
1. Download **davis.cpp**, **davis.h** and **plotly-2.32.0.min.js** from our last [release](https://github.com/valvals/devtools/releases) | ||
2. Put **davis.cpp**, **davis.h** in one folder in your project | ||
3. Put **plotly-2.32.0.min.js** to folder *your build_folder/davis_htmls* | ||
4. Include **davis.h** to your project | ||
5. Now you can use Davis functionality | ||
|
||
> [!Note] | ||
> If you are lazy to find folder at **step №3** you can skip this step. While running Davis you will be shown error page where you will see path you need | ||
> <img src="_media//error_page.png" width="600"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,26 @@ | ||
# 🔍 Examples | ||
|
||
<!-- tabs:start --> | ||
|
||
# **Large 2D matrix** | ||
|
||
bigFile.csv - [download example](_media/gui/bigFile.csv ':ignore') | ||
|
||
<img src="_media/gui/bigFile.png" width="500"> | ||
|
||
# **XY chart** | ||
|
||
xy.csv - [download example](_media/gui/xy.csv ':ignore') | ||
|
||
<img src="_media/gui/xy_square.png" width="500"> | ||
|
||
# ** 1 column data** | ||
|
||
column.csv - [download example](_media/gui/column.csv ':ignore') | ||
|
||
<img src="_media/gui/column.png" width="500"> | ||
|
||
|
||
<!-- tabs:end --> | ||
|
||
## Heatmap | ||
|
||
```cpp | ||
#include "davis.h" | ||
|
||
// vals - is user's 2d array | ||
int rows = 20; | ||
int cols = 20; | ||
int** vals = new int* [rows]; | ||
for (int i = 0; i < rows; ++i) { | ||
vals[i] = new int[cols]; | ||
for (int j = 0; j < cols; ++j) { | ||
vals[i][j] = i * cols + j; | ||
} | ||
} | ||
dv::show(vals, rows, cols); // pass varible and dimensions of 2d array | ||
``` | ||
![2d](https://github.com/valvals/devtools/assets/104432560/16832af7-d8c4-4af9-b4b1-60b0d6027478) | ||
## Surface | ||
```cpp | ||
#include "davis.h" | ||
//it possible and std::list<std::vector<double>> values = ... | ||
// std::vector<std::list<double>> values = ... | ||
std::vector<std::vector<double>> values = {{30.3, 40, 98, 76} | ||
, {99, 45, 20, 1} | ||
, {5, 56, 93, 25} | ||
, {45, 23, 90, 2}}; | ||
auto config = dv::Config(); | ||
config.typeVisual = dv::VISUALTYPE_SURFACE; // select surface visual mode | ||
config.surf.colorSc = dv::COLORSCALE_THERMAL; // change colorscale | ||
bool result = dv::show(values, "testSurfacePage", config); // pass 2d data, html page name, configuration structure | ||
``` | ||
![surf](https://github.com/valvals/devtools/assets/104432560/8d1c5488-049f-4471-9e58-1e97b59c03e7) | ||
|
||
|
||
## Chart | ||
|
||
```cpp | ||
#include "davis.h" | ||
|
||
int vals[] = {2, 6, 4, -34, 56, 33, 2, 15 }; | ||
auto config = dv::Config(); | ||
config.heatmap.title = "Custom title"; // change default settings to custom for heatmap | ||
config.heatmap.xLabel = "Custom xLabel"; // change default settings to custom for heatmap | ||
config.heatmap.yLabel = "Custom yLabel"; // change default settings to custom for heatmap | ||
bool result = dv::show(vals, sizeof(vals) / sizeof(vals[0]), "htmlPageName", config); | ||
``` | ||
![chart](https://github.com/valvals/devtools/assets/104432560/43903324-f49c-42f3-9ef1-3cb7e95a786d) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Installation | ||
# ⚒️ Installation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,14 @@ | ||
# 💻 Usages | ||
All user's functions, structs, etc. are placed in `dv::` namespace. | ||
|
||
## Show(...) function | ||
There is one template overload function for visualization different types of data: | ||
1. Run davis.exe file | ||
2. Drag and drop your text files to application window | ||
3. Wait for vizualization data in browser | ||
|
||
<img src="_media//dv_show.png" width="1110"> | ||
<img src="_media//gui-all.png" width="800"> | ||
|
||
First arguments of `dv::show(...)` could be either pointer to array: | ||
We are using smart recognising of: | ||
* column & line separators | ||
* where is number data and where is text headers | ||
* what type of data visualization is more appropriate | ||
|
||
| Arguments | Description | | ||
| ------------ | ------------ | | ||
| ` T** data, uint64_t arrRows, uint64_t arrCols` | 2d array with arrRows × arrCols size. Data placed inside array of arrays | | ||
| ` const T* data, uint64_t arrRows, uint64_t arrCols` | 2d array with arrRows × arrCols size. Data placed inside pseudo 2d array (element access [i*arrCols + j]) | | ||
| ` const T* data, uint64_t count` | 1d array. Data placed inside array | | ||
|
||
or container: | ||
|
||
| Arguments | Description | | ||
| ------------ | ------------ | | ||
| ` C const& container_of_containers ` | 2d array. Data placed inside container of containers. Containers can be `std::vector`, `std::list`, `std::array`, etc. Content of containers must be convertable to `double` | | ||
| ` C const& container` | 1d array. Data placed inside container. Сontainer requirements are the same | | ||
|
||
</br> | ||
|
||
|
||
## Configuration structure | ||
Data vizuailisation can be tunned with using custom configuration `dv::Config`. | ||
Configuration storred 3 structures and 1 enumeration. | ||
|
||
1. Create `dv::Config` object; | ||
```cpp | ||
auto config = dv::Config(); | ||
``` | ||
|
||
2. Change it's type (or leave it default, so it will be `VISUALTYPE_AUTO`) | ||
```cpp | ||
config.typeVisual = dv::VISUALTYPE_SURFACE; | ||
``` | ||
|
||
3. Change fields of neaded visualisation type | ||
|
||
| Name of structure | Description | | ||
| ------------ | ------------ | | ||
|chart |for chart settings| | ||
|heatmap |for heatmap settings | | ||
|surf |for surface settings| | ||
|
||
```cpp | ||
config.surf.colorSc = dv::COLORSCALE_THERMAL; | ||
config.surf.title = "Custom title"; | ||
config.surf.xLabel = "Custom xLabel"; | ||
config.surf.yLabel = "Custom yLabel"; | ||
config.surf.zLabel = "Custom zLabel"; | ||
``` | ||
|
||
4. Pass it to `dv::show(...)`; | ||
```cpp | ||
dv::show(yourData, "yourName", config); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
window.$docsify = { | ||
name: 'DAVIS', | ||
repo: 'https://github.com/DevToolsOrganization/matrix-data-visualization-DAVIS.git', | ||
logo: '/_media/DevToolsDavis-updown-curves.svg', | ||
logo: '/_media/logo_coverPage.png', | ||
coverpage: true, | ||
|
||
loadSidebar: true, | ||
|
@@ -73,6 +73,4 @@ | |
<script src="//unpkg.com/[email protected]/dist/docsify-mermaid.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script> | ||
<script src="https://unpkg.com/docsify-plugin-flexible-alerts"></script> | ||
|
||
|
||
</html> |