Refine your search:

Is it possible to create a dotted Line Chart in splunk using Advanced XML?

asked 15 Aug '11, 18:46

Dark_Ichigo's gravatar image

Dark_Ichigo
4352214
accept rate: 60%


One Answer:

Yes it is possible, you need to modify the brush. Let me know if you need more information on it, but you need to set the line stroke.

Short answer:

<param name="charting.lineBrush">dashedStroke</param>

Here's the link: Brush Strokes

Long Answer:

I like to establish a core brush I use on a chart when I make modifications, in this case, a dashed line brush:

<param name="charting.myBrush">dashedStroke</param>
<param name="charting.myBrush.dashSize">10</param>
<param name="charting.myBrush.dashSpacing">10</param>
<param name="charting.myBrush.color">0xFF0000</param>
<param name="charting.myBrush.thickness">5</param>

Basically, this will create one super ugly thick red dashed line. When dealing with charts, you need to tell splunk how to reference the "series" of data (incase there is more then one line).

<param name="charting.myBrushPalette">list</param>
<param name="charting.myBrushPalette.brushes">[@myBrush]</param>
<param name="charting.chart.lineBrushPalette">@myBrushPalette</param>

We are telling splunk to now use a "list" for the series. This list only contains 1 option, therefore it's used for each line on the chart. You can specify additional brushes for line rendering other lines by following the same process.

<param name="charting.myBrush">dashedStroke</param>
<param name="charting.myBrush.dashSize">10</param>
<param name="charting.myBrush.dashSpacing">10</param>
<param name="charting.myBrush.color">0xFF0000</param>
<param name="charting.myBrush.thickness">5</param>
<param name="charting.myBrush2">solidStroke</param>
<param name="charting.myBrush2.color">0x00FF00</param>
<param name="charting.myBrushPalette">list</param>
<param name="charting.myBrushPalette.brushes">[@myBrush,@myBrush2]</param>
<param name="charting.chart.lineBrushPalette">@myBrushPalette</param>

This will use the dotted line for the "first" series, and a green line for the "second" series, reguardless of name. If you want more control, use the "field" palette to define the name of the series to reference a brush.

<param name="charting.myBrush">dashedStroke</param>
<param name="charting.myBrush.dashSize">10</param>
<param name="charting.myBrush.dashSpacing">10</param>
<param name="charting.myBrush.color">0xFF0000</param>
<param name="charting.myBrush.thickness">5</param>
<param name="charting.myBrush2">solidStroke</param>
<param name="charting.myBrush2.color">0x00FF00</param>
<param name="charting.myBrushPalette">field</param>
<param name="charting.myBrushPalette.fieldBrushes">{Average_Duration:@myBrush,Count:@myBrush2}</param>
<param name="charting.myBrushPalette.defaultBrushPalette">@myBrush2</param>
<param name="charting.chart.lineBrushPalette">@myBrushPalette</param>

This will establish the "count" line as the dotted line, the "Average_Duration" line as the green line, then make any other line the same green line as "Average_Duration".

link

answered 17 Aug '11, 23:13

bbingham's gravatar image

bbingham
1.7k39
accept rate: 38%

edited 12 Sep '11, 23:23

Iv tried that, but I really cant get to do it......Any more help would be great!

(25 Aug '11, 01:23) Dark_Ichigo

Im currently having trouble setting the Line Stroke, is there a Step by Step tutorial of doing so?

(11 Sep '11, 20:09) Dark_Ichigo

I'll modify my original response to include a short walkthrough.

(12 Sep '11, 23:00) bbingham

Excellent answer.

(12 Sep '11, 23:39) Ayn
Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×254
×28
×1

Asked: 15 Aug '11, 18:46

Seen: 925 times

Last updated: 12 Sep '11, 23:39

Copyright © 2005-2012 Splunk Inc. All rights reserved.