Dashboards & Visualizations

AxisLabels on Overlay Chart

herbie
Path Finder

Hi Guys, I've created a new overlay with the help of another Answers question (http://answers.splunk.com/questions/9053/example-of-chart-overlay), and everything is working perfectly except that I can't figure out how to get the axisLabels on the second Y axis to display.

Below is my xml. It's the axisLabelsY2 that aren't displaying.

Thanks in advance! Ashley

<view autoCancelInterval="90" isVisible="true" objectMode="SimpleDashboard" onunloadCancelJobs="true" refresh="-1" template="dashboard.html">
    <label>PROD - ODR Hits vs Response Time</label>
    <module name="AccountBar" layoutPanel="appHeader"/>
    <module name="AppBar" layoutPanel="navigationHeader"/>
    <module name="Message" layoutPanel="messaging">
        <param name="filter">*</param>
        <param name="clearOnJobDispatch">False</param>
        <param name="maxSize">1</param>
    </module>
    <module name="Message" layoutPanel="messaging">
        <param name="filter">splunk.search.job</param>
        <param name="clearOnJobDispatch">True</param>
        <param name="maxSize">1</param>
    </module>
    <module name="TitleBar" layoutPanel="viewHeader">
        <param name="actionsMenuFilter">dashboard</param>
    </module>
    <module name="TimeRangePicker" layoutPanel="viewHeader">
        <param name="searchWhenChanged">True</param>
        <param name="selected">Year to date</param>
        <module name="HiddenSearch" layoutPanel="panel_row1_col1" group="Search Query - URI's can be added to the cs_uri_stem field." autoRun="True">
            <param name="search">index=summary source="prod - odr hits by url - daily summary" cs_uri_stem=* | timechart span=1d sum(count) as count, avg(AvgResTime) as ResTime | `lineartrend(_time,count,counttrend)` | `lineartrend(_time,ResTime,restrend)` | timechart span=1d sum(count) as Hits, sum(counttrend) as HitsTrend, sum(ResTime) as AvgResTime,  sum(restrend) as ResTimeTrend</param>
            <module name="SearchBar" layoutPanel="panel_row1_col1">
                <param name="field">cs_uri_stem</param>
                <param name="label">Modify Search String</param>
                <param name="useAssistant">true</param>
                <param name="autoOpenAssistant">true</param>
                <module name="HiddenChartFormatter">
                    <param name="charting.legend.placement">top</param>
                    <param name="charting.chart">column</param>
                    <param name="charting.chart.columnAlignment">.5</param>
                    <param name="charting.axisX">time</param>
                    <param name="charting.axisY">numeric</param>
                    <param name="charting.axisY2">numeric</param>
                    <param name="charting.axisTitleX.text">Date</param>
                    <param name="charting.axisTitleY.text">Hits</param>
                    <param name="charting.axisTitleY2.text">Average Response Time</param>
                    <param name="charting.axisLabelsY2">#axisLabelsY2</param>
                    <param name="charting.axisLabelsY2.axis">@axisY2</param>
                    <param name="charting.axisLabelsY2.placement">right</param>
                    <param name="charting.data0">results</param>
                    <param name="charting.data0.jobID">@data.jobID</param>
                    <param name="charting.data1">view</param>
                    <param name="charting.data1.table">@data0</param>
                    <param name="charting.data1.columns">[0,1]</param>
                    <param name="charting.data2">view</param>
                    <param name="charting.data2.table">@data0</param>
                    <param name="charting.data2.columns">[0,2]</param>
                    <param name="charting.data3">view</param>
                    <param name="charting.data3.table">@data0</param>
                    <param name="charting.data3.columns">[0,3:4]</param>
                    <param name="charting.chart.data">@data1</param>
                    <param name="charting.chart2">line</param>
                    <param name="charting.chart2.axisY">@axisY</param>
                    <param name="charting.chart2.data">@data2</param>
                    <param name="charting.chart3">line</param>
                    <param name="charting.chart3.axisY">@axisY2</param>
                    <param name="charting.chart3.data">@data3</param>
                    <param name="charting.layout.charts">[@chart,@chart2,@chart3]</param>
                    <param name="charting.layout.axisTitles">[@axisTitleX,@axisTitleY,@axisTitleY2]</param>
                    <param name="charting.layout.axisLabels">[@axisLabelsX,@axisLabelsY,@axisLabelsY2]</param>
                    <module name="YAxisRangeMinimumFormatter" layoutPanel="panel_row2_col1" group="Y Axis Minimum">
                        <param name="default"></param>
                        <module name="YAxisRangeMaximumFormatter" layoutPanel="panel_row2_col2" group="Y Axis Maximum">
                            <param name="default"></param>
                            <module name="ChartTypeFormatter" layoutPanel="panel_row2_col3" group="Hits Chart Type">
                                <param name="default">column</param>
                                <module name="FlashChart" layoutPanel="panel_row3_col1" group="ODR Hits vs Response Times">
                                    <param name="height">600px</param>
                                </module>
                            </module>
                        </module>
                    </module>
                </module>
            </module>
        </module>
    </module>
</view>
Tags (2)
1 Solution

bbingham
Builder

Something that sticks out to me, you're defining your Y2 axis off the Y2 axis symbol, which doesn't exist yet.

<param name="charting.axisLabelsY2">#axisLabelsY2</param>

If you reference the primary axis first:

<param name="charting.axisLabelsY2">#axisLabelsY</param>

You'll create the axis off the symbol for Y, and then you can modify it accordingly.

Let me know if you have any problems!

View solution in original post

bbingham
Builder

Something that sticks out to me, you're defining your Y2 axis off the Y2 axis symbol, which doesn't exist yet.

<param name="charting.axisLabelsY2">#axisLabelsY2</param>

If you reference the primary axis first:

<param name="charting.axisLabelsY2">#axisLabelsY</param>

You'll create the axis off the symbol for Y, and then you can modify it accordingly.

Let me know if you have any problems!

herbie
Path Finder

Ah, that makes sense, thanks for the explanation.

0 Karma

bbingham
Builder

I should also specify, the @ uses the value of something else, the # makes a copy of it.

0 Karma

bbingham
Builder

You're actually taking the entire "array" from axisLabelsY, this includes all the information on how to draw the text and what the axis shape should be (axisBrush,axisVisibility, etc). Basically, your line of axisLabelsY2 was telling splunk to draw an axis, but you didn't tell splunk what color to use, how to draw it or what it should look like. So you would need to define the brush, pallet, and color to get axisLabelsY2 to render.

I like to cheat... so I use another predefined object to steal all that information from and then modify the information that I care about.

herbie
Path Finder

That works, such a simple thing, thankyou so much.
I don't really understand that value though. According to the documentation, the 'charting.axisLabels' parameter defines whether it's a numeric, category, or time axis. So when the value is'#axisLabelsY', what is that defining?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...