Skip to content

Commit 665f4db

Browse files
committed
Fixing missing folder after renaming
1 parent 5a89c99 commit 665f4db

File tree

11 files changed

+208830
-2
lines changed

11 files changed

+208830
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Tyler Muth - Project Manager
88
Analytics Architect, Washington, D.C.
99

1010
This modular visualization app includes:
11-
1. Candlestick/OHLC Chart - for Stocks and Financial Data. [Candlestick/OHLC source code](https://github.com/tmuth/plotly_custom_viz_splunk/blob/master/appserver/static/visualizations/candlestick_chart/src/visualization_source.js)
11+
1. OHLC Chart - for Stocks and Financial Data. [OHLC source code](https://github.com/tmuth/plotly_custom_viz_splunk/blob/master/appserver/static/visualizations/ohlc/src/visualization_source.js)
1212
2. Box Plot Chart - for displaying Statistical Data. [BoxPlot source code](https://github.com/tmuth/plotly_custom_viz_splunk/blob/master/appserver/static/visualizations/boxplot/src/visualization_source.js)
1313

1414
## Installation
@@ -22,7 +22,7 @@ Download the app **plotly_custom_viz_splunk** from **GitHub** and installed in y
2222
- Restart splunk to apply changes `$SPLUNK_HOME/bin/splunk restart`
2323

2424
## Usage
25-
Sample SPL Search for Candlestick/OHLC:
25+
Sample SPL Search for OHLC:
2626

2727
```sh
2828
| makeresults count=60
@@ -36,6 +36,9 @@ Sample SPL Search for Candlestick/OHLC:
3636
| eval high=if(open > close,(open*.1)+open,(close*.1)+close)
3737
| eval low=if(open < close,open-(open*.1),close-(close*.1))
3838
| fields - sign,count
39+
| sort _time
40+
| trendline ema8(close) AS 8PointEMA ema20(close) AS 20PointEMA
41+
| reverse
3942
```
4043

4144

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Splunk Visualization App Template
2+
3+
This is the basic template for a splunk visualization app. This teamplate is meant to be edited to build custom visualizations. It contains:
4+
5+
- The relevant directory structure for a visuzliation app
6+
- A standin visualization package directory with a standin visualiztion and a basic webpack configuration
7+
- Relevant .conf files for the visualization
8+
9+
## Building the visualization
10+
11+
NOTE: You must have npm installed in oder to build. If you do not have npm installed, install it and come back.
12+
13+
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:
14+
15+
```
16+
$ npm install
17+
```
18+
Once you done that, you can build the viz with the provided build task:
19+
20+
```
21+
$ npm run build
22+
```
23+
24+
This will create a *visualization.js* file in the visualization directory.
25+
26+
## Adding Your Own Code
27+
28+
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.
29+
30+
## More Information
31+
For more information on building custom visualizations including a tutorial, API overview, and more see:
32+
33+
http://docs.splunk.com/Documentation/Splunk/6.5.0/AdvancedDev/CustomVizDevOverview
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
/*-- Chart --*/
2+
.c3 svg {
3+
font: 10px sans-serif;
4+
-webkit-tap-highlight-color: transparent; }
5+
6+
.c3 path, .c3 line {
7+
fill: none;
8+
stroke: #000; }
9+
10+
.c3 text {
11+
-webkit-user-select: none;
12+
-moz-user-select: none;
13+
user-select: none; }
14+
15+
.c3-legend-item-tile,
16+
.c3-xgrid-focus,
17+
.c3-ygrid,
18+
.c3-event-rect,
19+
.c3-bars path {
20+
shape-rendering: crispEdges; }
21+
22+
.c3-chart-arc path {
23+
stroke: #fff; }
24+
25+
.c3-chart-arc rect {
26+
stroke: white;
27+
stroke-width: 1; }
28+
29+
.c3-chart-arc text {
30+
fill: #fff;
31+
font-size: 13px; }
32+
33+
/*-- Axis --*/
34+
/*-- Grid --*/
35+
.c3-grid line {
36+
stroke: #aaa; }
37+
38+
.c3-grid text {
39+
fill: #aaa; }
40+
41+
.c3-xgrid, .c3-ygrid {
42+
stroke-dasharray: 3 3; }
43+
44+
/*-- Text on Chart --*/
45+
.c3-text.c3-empty {
46+
fill: #808080;
47+
font-size: 2em; }
48+
49+
/*-- Line --*/
50+
.c3-line {
51+
stroke-width: 1px; }
52+
53+
/*-- Point --*/
54+
.c3-circle._expanded_ {
55+
stroke-width: 1px;
56+
stroke: white; }
57+
58+
.c3-selected-circle {
59+
fill: white;
60+
stroke-width: 2px; }
61+
62+
/*-- Bar --*/
63+
.c3-bar {
64+
stroke-width: 0; }
65+
66+
.c3-bar._expanded_ {
67+
fill-opacity: 1;
68+
fill-opacity: 0.75; }
69+
70+
/*-- Focus --*/
71+
.c3-target.c3-focused {
72+
opacity: 1; }
73+
74+
.c3-target.c3-focused path.c3-line, .c3-target.c3-focused path.c3-step {
75+
stroke-width: 2px; }
76+
77+
.c3-target.c3-defocused {
78+
opacity: 0.3 !important; }
79+
80+
/*-- Region --*/
81+
.c3-region {
82+
fill: steelblue;
83+
fill-opacity: .1; }
84+
85+
/*-- Brush --*/
86+
.c3-brush .extent {
87+
fill-opacity: .1; }
88+
89+
/*-- Select - Drag --*/
90+
/*-- Legend --*/
91+
.c3-legend-item {
92+
font-size: 12px; }
93+
94+
.c3-legend-item-hidden {
95+
opacity: 0.15; }
96+
97+
.c3-legend-background {
98+
opacity: 0.75;
99+
fill: white;
100+
stroke: lightgray;
101+
stroke-width: 1; }
102+
103+
/*-- Title --*/
104+
.c3-title {
105+
font: 14px sans-serif; }
106+
107+
/*-- Tooltip --*/
108+
.c3-tooltip-container {
109+
z-index: 10; }
110+
111+
.c3-tooltip {
112+
border-collapse: collapse;
113+
border-spacing: 0;
114+
background-color: #fff;
115+
empty-cells: show;
116+
-webkit-box-shadow: 7px 7px 12px -9px #777777;
117+
-moz-box-shadow: 7px 7px 12px -9px #777777;
118+
box-shadow: 7px 7px 12px -9px #777777;
119+
opacity: 0.9; }
120+
121+
.c3-tooltip tr {
122+
border: 1px solid #CCC; }
123+
124+
.c3-tooltip th {
125+
background-color: #aaa;
126+
font-size: 14px;
127+
padding: 2px 5px;
128+
text-align: left;
129+
color: #FFF; }
130+
131+
.c3-tooltip td {
132+
font-size: 13px;
133+
padding: 3px 6px;
134+
background-color: #fff;
135+
border-left: 1px dotted #999; }
136+
137+
.c3-tooltip td > span {
138+
display: inline-block;
139+
width: 10px;
140+
height: 10px;
141+
margin-right: 6px; }
142+
143+
.c3-tooltip td.value {
144+
text-align: right; }
145+
146+
/*-- Area --*/
147+
.c3-area {
148+
stroke-width: 0;
149+
opacity: 0.2; }
150+
151+
/*-- Arc --*/
152+
.c3-chart-arcs-title {
153+
dominant-baseline: middle;
154+
font-size: 1.3em; }
155+
156+
.c3-chart-arcs .c3-chart-arcs-background {
157+
fill: #e0e0e0;
158+
stroke: #FFF; }
159+
160+
.c3-chart-arcs .c3-chart-arcs-gauge-unit {
161+
fill: #000;
162+
font-size: 16px; }
163+
164+
.c3-chart-arcs .c3-chart-arcs-gauge-max {
165+
fill: #777; }
166+
167+
.c3-chart-arcs .c3-chart-arcs-gauge-min {
168+
fill: #777; }
169+
170+
.c3-chart-arc .c3-gauge-value {
171+
fill: #000;
172+
/* font-size: 28px !important;*/ }
173+
174+
.c3-chart-arc.c3-target g path {
175+
opacity: 1; }
176+
177+
.c3-chart-arc.c3-target.c3-focused g path {
178+
opacity: 1; }
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<form class="splunk-formatter-section" section-label="General">
2+
<splunk-control-group label="Chart Type">
3+
<splunk-radio-input name="{{VIZ_NAMESPACE}}.chartType" value='candlestick'>
4+
<option value='candlestick'>Candlestick</option>
5+
<option value='ohlc'>Bar</option>
6+
</splunk-radio-input>
7+
</splunk-control-group>
8+
<splunk-control-group label="Display Legend">
9+
<splunk-radio-input name="{{VIZ_NAMESPACE}}.showLegend" value='1'>
10+
<option value='1'>Show</option>
11+
<option value='0'>Hide</option>
12+
</splunk-radio-input>
13+
</splunk-control-group>
14+
<splunk-control-group label="Display Plotly Mode Bar">
15+
<splunk-radio-input name="{{VIZ_NAMESPACE}}.mbDisplay" value='0'>
16+
<option value='1'>Show</option>
17+
<option value='0'>Hide</option>
18+
</splunk-radio-input>
19+
</splunk-control-group>
20+
</form>
21+
22+
<form class="splunk-formatter-section" section-label="X-Axis">
23+
<splunk-control-group label="Label Name">
24+
<splunk-text-input name="{{VIZ_NAMESPACE}}.xAxisName">
25+
</splunk-text-input>
26+
</splunk-control-group>
27+
<splunk-control-group label="Label Rotation">
28+
<splunk-radio-input name="{{VIZ_NAMESPACE}}.xAngle" value=0>
29+
<option value=0>Default</option>
30+
<option value=45>45°</option>
31+
<option value=90>90°</option>
32+
</splunk-radio-input>
33+
</splunk-control-group>
34+
<splunk-control-group label="Display X-Axis RangeSlider">
35+
<splunk-radio-input name="{{VIZ_NAMESPACE}}.showRSlider" value='0'>
36+
<option value='1'>Show</option>
37+
<option value='0'>Hide</option>
38+
</splunk-radio-input>
39+
</splunk-control-group>
40+
</form>
41+
42+
<form class="splunk-formatter-section" section-label="Y-Axis">
43+
<splunk-control-group label="Label Name">
44+
<splunk-text-input name="{{VIZ_NAMESPACE}}.yAxisName">
45+
</splunk-text-input>
46+
</splunk-control-group>
47+
<splunk-control-group label="Label Rotation">
48+
<splunk-radio-input name="{{VIZ_NAMESPACE}}.yAngle" value=0>
49+
<option value=0>Default</option>
50+
<option value=45>45°</option>
51+
<option value=90>90°</option>
52+
</splunk-radio-input>
53+
</splunk-control-group>
54+
</form>
55+
56+
<form class="splunk-formatter-section" section-label="Trendlines">
57+
<splunk-control-group label="Exponential Moving Average">
58+
<splunk-select name="{{VIZ_NAMESPACE}}.showEMA" value='none'>
59+
<option value='none'>None</option>
60+
<option value='8pointema'>8PointEMA</option>
61+
<option value='20pointema'>20PointEMA</option>
62+
<option value='all'>Both</option>
63+
</splunk-select>
64+
</splunk-control-group>
65+
<splunk-control-group label="Simple Moving Average">
66+
<splunk-select name="{{VIZ_NAMESPACE}}.showSMA" value='none'>
67+
<option value='none'>None</option>
68+
<option value='4pointsma'>4PointSMA</option>
69+
</splunk-select>
70+
</splunk-control-group>
71+
</form>

0 commit comments

Comments
 (0)