Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
bundle-app:
name: Bundle App
runs-on: ubuntu-latest
outputs:
artifact_name: ${{ steps.app.outputs.artifact_name }}
steps:
- uses: actions/checkout@v4
- name: Read App Info
Expand All @@ -21,6 +23,7 @@ jobs:
app_version=$(cat splunk_*/app.manifest | jq -r '.info.id.version')
echo "name=${app_id}" >> $GITHUB_OUTPUT
echo "version=${app_version}" >> $GITHUB_OUTPUT
echo "artifact_name=${app_id}-${app_version}" >> $GITHUB_OUTPUT
working-directory: ./packages

- name: Bundle app source
Expand All @@ -36,7 +39,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: packaged_app
name: ${{ steps.app.outputs.artifact_name }}
path: ${{ steps.app.outputs.name }}*.tar.gz

slim-validate:
Expand All @@ -50,7 +53,7 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: packaged_app
name: ${{ needs.bundle-app.outputs.artifact_name }}

- name: Set up Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -79,7 +82,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: packaged_app
name: ${{ needs.bundle-app.outputs.artifact_name }}
path: dist
- uses: splunk/appinspect-cli-action@v2.10
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
ta_version: ${{ steps.app.outputs.version }}
artifact_name: ${{ steps.app.outputs.artifact_name }}
steps:
- uses: actions/checkout@v4
- name: Get App Info
Expand All @@ -28,6 +29,7 @@ jobs:
app_version=$(cat "$MANIFEST" | jq -r '.info.id.version')
echo "name=${app_id}" >> $GITHUB_OUTPUT
echo "version=${app_version}" >> $GITHUB_OUTPUT
echo "artifact_name=${app_id}-${app_version}" >> $GITHUB_OUTPUT
else
echo "Files Not Found ❌ Please add 'packages/$MANIFEST'"
exit 1
Expand All @@ -46,7 +48,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: packaged_app
name: ${{ steps.app.outputs.artifact_name }}
path: ${{ steps.app.outputs.name }}*.tar.gz

release:
Expand All @@ -57,7 +59,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: packaged_app
name: ${{ needs.build.outputs.artifact_name }}
path: dist
- name: Fetch latest release info from CHANGELOG
id: changelog
Expand Down
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
![Custom badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fsplunkbasebadge.livehybrid.com%2Fv1%2Fdownloads%2F5730%2F)
[![Actions Status: test](https://github.com/splunk/splunk-plotly-collection-viz/actions/workflows/ci.yml/badge.svg)](https://github.com/splunk/splunk-plotly-collection-viz/actions?query=workflow%3A"CI")
[![Latest release (latest by date)](https://img.shields.io/github/v/release/splunk/splunk-plotly-collection-viz?label=Latest%20Release)](https://github.com/splunk/splunk-plotly-collection-viz/releases)
[![License](https://img.shields.io/github/license/splunk/splunk-plotly-collection-viz)](LICENSE)
[![License](https://img.shields.io/github/license/splunk/splunk-plotly-collection-viz)](./packages/splunk_plotly_collection_viz/LICENSE.md)

A collection of Splunk modular visualizations based on [plotly.js](https://github.com/plotly/plotly.js/), a JavaScript open-source library used to create interactive charts for finance, engineering and sciences.

Visualizations included into this collection:
* OHLC Chart - for Stocks and Financial Data ([source code](appserver/static/visualizations/ohlc/src/visualization_source.js))
* Box Plot Chart - for Statistical Data ([source code](appserver/static/visualizations/boxplot/src/visualization_source.js))
* Multiple Axes Chart - for Advanced Statistical Data Visualizations ([source code](appserver/static/visualizations/multiple-axes/src/visualization_source.js))
* [OHLC Chart](#ohlc-chart) for Stocks and Financial Data :hammer_and_wrench: [source code](appserver/static/visualizations/ohlc/src/visualization_source.js)
* [Box Plot Chart](#box-plot) for Statistical Data :hammer_and_wrench: [source code](appserver/static/visualizations/boxplot/src/visualization_source.js)
* [Multiple Axes Chart](#multiple-axes-plot) for Advanced Statistical Data Visualizations :hammer_and_wrench: [source code](appserver/static/visualizations/multiple-axes/src/visualization_source.js)
* [Scatterplot 3D](#scatterplot3d) for Multiple Dimensions / Clustering Data Visualizations :hammer_and_wrench: [source code](appserver/static/visualizations/scatterplot3d/src/visualization_source.js)

## Installation
Please refer to the [Splunk Documentation](https://docs.splunk.com/Documentation/AddOns/released/Overview/Installingadd-ons) for guidance on installing the Add-On in your environment. The app needs to be installed on the SH tier.
Expand Down Expand Up @@ -62,6 +63,24 @@ Replace `_time`, `scatter-y2-datasetX` and `line-y-datasetX` with your fields to

![alt text](etc/MultipleAxes_plot.png "Multiple Axes Plot")

### Scatterplot 3D
`<basesearch> | table trace x y z [marker_size]`

If not provided, default values will be used for optional field `marker_size`.

Replace `trace`, `x`, `y` and `z` with your fields to start.

| FieldName | Format | Description | Example |
|-------------|---------|--------------------------|-----------|
| `trace` | string | Label of the trace | `A` |
| `x` | numeric | X-coordinate of data forming trace dataset | `20` |
| `y` | numeric | Y-coordinate of data forming trace dataset | `2` |
| `z` | numeric | Z-coordinate of data forming trace dataset | `100` |
| `marker_size` | numeric | Size of the data marker in pixels. Range [1-50]. | `20` |


![alt text](etc/scatterplot3d.png "Scatterplot 3D Chart Example")

## Example
This app comes with a dashboard showcasing simple usages of mentioned charts.

Expand Down
Binary file added etc/scatterplot3d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,13 @@ display.visualizations.custom.multiple-axes.multiple-axes.y2Angle = <float>

display.visualizations.custom.multiple-axes.multiple-axes.xAxisName = <string>
display.visualizations.custom.multiple-axes.multiple-axes.yAxisName = <string>
display.visualizations.custom.multiple-axes.multiple-axes.y2AxisName = <string>
display.visualizations.custom.multiple-axes.multiple-axes.y2AxisName = <string>

display.visualizations.custom.scatterplot3d.scatterplot3d.mbDisplay = <number>
display.visualizations.custom.scatterplot3d.scatterplot3d.showLegend = <number>
display.visualizations.custom.scatterplot3d.scatterplot3d.xAngle = <float>
display.visualizations.custom.scatterplot3d.scatterplot3d.yAngle = <float>
display.visualizations.custom.scatterplot3d.scatterplot3d.zAngle = <float>
display.visualizations.custom.scatterplot3d.scatterplot3d.xAxisName = <string>
display.visualizations.custom.scatterplot3d.scatterplot3d.yAxisName = <string>
display.visualizations.custom.scatterplot3d.scatterplot3d.zAxisName = <string>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"d3": "^7.6.1",
"jquery": ">=3.5.0",
"plotly.js-dist": "^2.4.1",
"underscore": "^1.12.1"
"plotly.js-dist": "^3.1.0",
"underscore": "^1.13.7"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"d3": "^3.5.16",
"lodash.clonedeep": "^4.5.0",
"jquery": ">=3.5.0",
"plotly.js-dist": "^2.4.1",
"underscore": "^1.12.1"
"plotly.js-dist": "^3.1.0",
"underscore": "^1.13.7"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"d3": "^7.6.1",
"jquery": ">=3.5.0",
"plotly.js-dist": "^2.4.1",
"underscore": "^1.12.1",
"plotly.js-dist": "^3.1.0",
"underscore": "^1.13.7",
"sma": "^0.1.1",
"exponential-moving-average": "^1.0.0"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Splunk Visualization App Template

This is the basic template for a splunk visualization app. This teamplate is meant to be edited to build custom visualizations. It contains:

- The relevant directory structure for a visualization app
- A standin visualization package directory with a standin visualiztion and a basic webpack configuration
- Relevant .conf files for the visualization

## Building the visualization

:point_right: You **must have npm installed** in oder to build. If you do not have npm installed, install it and come back. :point_left:

The visualization contained in this app must be built using web pack in order to run it on Splunk. There is a basic webpack configuration built in to the app. To build from the command line, first, cd to the *visualization/standin* directory. On the first run you will have to install the dependeincies with npm:

```
$ npm install
```
Once you done that, you can build the viz with the provided build task:

```
$ npm run build
```

This will create a *visualization.js* file in the visualization directory.

## Adding Your Own Code

The standin viz isn't very interesting, so you will want to add your own code. You should rename the *visualization/src/standin.js* file to something appropriate, then you can edit it as you see fit. To build, you will have to change the `entry` variable in *visualization/webpack.config* to corespond to your new file name. Then you can run the build task again.

## More Information
For more information on building custom visualizations including a tutorial, API overview, and more see:

http://docs.splunk.com/Documentation/Splunk/6.5.0/AdvancedDev/CustomVizDevOverview
Loading