All Apps and Add-ons

Chart width in Sideview Utils Table module

wpreston
Motivator

I have a dashboard in which a Search at the top produces a datacube, which flow down to two post process modules then to a Table and a JSChart. Each row of the Table displays a Timechart. It is pretty much following the second example from the Sideview Utils Table module documentation with the exception that it produces Timecharts per row of the Table rather than bar charts via stats. Everything works fine except for the width of the charts, they seem to display with random widths. The first chart is about half the width of the screen, the second one appears to be full width, and the third one is less than full width but more than half width. I've tried setting the width parameter on JSChart, but it didn't help. Any ideas? My anonymized code is below:

<view autoCancelInterval="90" isSticky="False" isVisible="true" onunloadCancelJobs="true" template="dashboard.html" stylesheet="Metrics.css">
<label>My View</label>

<module name="AccountBar" layoutPanel="appHeader" />

<module name="AppBar" layoutPanel="appHeader" />

<module name="SideviewUtils" layoutPanel="appHeader" />

<module name="Message" layoutPanel="messaging">
    <param name="filter">*</param>
    <param name="maxSize">2</param>
    <param name="clearOnJobDispatch">False</param>
</module>

<module name="HTML" layoutPanel="viewHeader">
    <param name="html"><![CDATA[
    <h1>This is my sample view<h1> 
    ]]></param>
</module>


<module name="Search" layoutPanel="mainSearchControls" autoRun="True">
    <param name="search"> earliest=-30d@d latest=now My Search Params | stats count by foo, bar, baz, bin, bang, boom, _time </param>

    <module name="PostProcess" layoutPanel="panel_row1_col1">
        <param name="search">eval values="PLACEHOLDER" | stats count by foo values | table foo values</param>

        <module name="HiddenChartFormatter">
            <param name="charting.chart">line</param>
            <module name="Table">
                <module name="PostProcess" group="row.fields.values">
                    <param name="search">search foo="$row.fields.foo$" | timechart count by bar</param>
                    <module name="JSChart">                         
                    </module>
                </module> <!--PostProcess-->
            </module> <!--Table-->
        </module> <!--Chart formatter -->
</module> <!--postProcess -->

</module><!--Primary search -->
</view>
0 Karma
1 Solution

wpreston
Motivator

I ended up solving this by using the Multiplexer module instead of Table. Works beautifully with Multiplexer, in case anyone else is looking for something similar.

View solution in original post

0 Karma

wpreston
Motivator

I ended up solving this by using the Multiplexer module instead of Table. Works beautifully with Multiplexer, in case anyone else is looking for something similar.

0 Karma

wpreston
Motivator

Some more information: I changed my search so that it would only make a timechart of the first item from my question above, and it still only displayed the chart at half the screen's width. If I change it to display the first and second, the second one is full width, but the first one is still only half.

0 Karma

rgcurry
Contributor

I had a similar results but in my case, it was individual searches, not post processing. The data being charted was similar data with slight differences in filtering and field selections from the source data. What I did to resolve the difference in chart widths was sync up the timeframe of each search's data source. Not sure this is what is causing your problem but for me, the data in timechart #1 was a longer timeframe than that of the data in timechart #2. Both searches used the same search time selection; in my case it was "earliest=-7d@d latest=@d". Making the data source fill the same timeframe gave me the same size charts.

0 Karma

wpreston
Motivator

Hmm...interesting. I wonder if it has to do with how many days of the charted period have search results in them. I just hard coded my search so that only the first chart would be shown, and it still only as wide as about half the screen. I'll update the question above with this info as well.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...