Implementing Splunk 7(Third Edition)
上QQ阅读APP看书,第一时间看更新

charting.lineWidth

This charting option gives you the chance to set a chart's line width in pixels (px). There are no special instructions for the use of this new option. You simply include it as part of your chart definition:

<option name-"charting.linewidth">2px</option> 

In the given XML, we've added the linewidth option to the XML that was used to show an Event Annotation in Chapter 2Understanding Search:

<dashboard> 
  <label>Errors with Process Issues Annoted</label> 
  <row> 
    <panel> 
      <chart> 
        <search> 
          <!-- Secondary search that drives the annotations --> 
          <query>sourcetype="tm1*" error | timechart count</query> 
          <earliest>-30week</earliest> 
          <latest>-1weeks</latest> 
          <sampleRatio>1</sampleRatio> 
        </search> 
        <search type="annotation"> 
          <query>sourcetype="tm1*" Process | eval annotation_label = "Processes Offline"</query> 
          <earliest>-30week</earliest> 
          <latest>-15weeks</latest> 
        </search> 
        <!--- main search --> 
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option> 
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option> 
        <option name="charting.axisTitleX.visibility">visible</option> 
        <option name="charting.axisTitleY.visibility">visible</option> 
        <option name="charting.axisTitleY2.visibility">visible</option> 
        <option name="charting.axisX.abbreviation">none</option> 
        <option name="charting.axisX.scale">linear</option> 
        <option name="charting.axisY.abbreviation">none</option> 
        <option name="charting.axisY.scale">linear</option> 
        <option name="charting.axisY2.abbreviation">none</option> 
        <option name="charting.axisY2.enabled">0</option> 
        <option name="charting.axisY2.scale">inherit</option> 
        <option name="charting.chart">line</option> 
        <option name="charting.chart.bubbleMaximumSize">50</option> 
        <option name="charting.chart.bubbleMinimumSize">10</option> 
        <option name="charting.chart.bubbleSizeBy">area</option> 
        <option name="charting.chart.nullValueMode">gaps</option> 
        <option name="charting.chart.showDataLabels">none</option> 
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option> 
        <option name="charting.chart.stackMode">default</option> 
        <option name="charting.chart.style">shiny</option> 
        <option name="charting.drilldown">none</option> 
        <option name="charting.layout.splitSeries">0</option> 
        <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option> 
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option> 
        <option name="charting.legend.mode">standard</option> 
        <option name="charting.legend.placement">right</option> 
        <option name="charting.lineWidth">9px</option> 
        <option name="trellis.enabled">0</option> 
        <option name="trellis.scales.shared">1</option> 
        <option name="trellis.size">medium</option> 
      </chart> 
    </panel> 
  </row> 
</dashboard> 

We can see the results of increasing the line width to 9px as follows: