Skip to Content

Stacked Bar - unable to display a bar for each day on x-axis

I am trying to create a stacked bar chart with a bar for each day's downtime data. Date on the X axis and ElapsedTime (stacked) on the Y axis. The chart appears to work for 1 or 2 days but fails to give me a bar for each day when the number of days returned > 2. Not sure if the bar chart requires the data to be stacked to be returned in different columns or do i have the display template setup improperly. Help

data -

DowntimeReason,EndDateTimeShift,ElapsedTime

Reason5,11/18/2007,86400

Tool Change,11/19/2007,3849

Reason5,11/19/2007,589

Reason4,11/19/2007,493

Machine Down,11/19/2007,380

Reason3,11/19/2007,4

Tool Change,11/20/2007,172

Reason3,11/20/2007,5

display template -

<?xml version="1.0" encoding="UTF-8"?><iChart AxisLabelColumns="EndDateTimeShift" AxisValueColumn="EndDateTimeShift" BarGroupSpacing="2" BarMarginSpacing="0" BarSpacing="1" ChartBackgroundColor="#C0C0C0" ChartBorderColor="#C0C0C0" ChartType="StackedBar" EnableDisplayTemplateLoad="true" EnableDisplayTemplateSave="true" EnableQueryTemplateLoad="true" EnableQueryTemplateSave="true" GlobalAutoScale="true" GlobalDecimals="0" GlobalMaxRange="120.0" HorizontalGridColor="#CE6523" InitialUpdate="false" InterpolateLines="false" LabelColumns="DowntimeReason" LegendBackgroundColor="#EAEAEA" LegendBorderColor="#EAEAEA" LegendDescriptionLabel="" LegendLabelColor="#000000" LegendSelectionBorderColor="#EAEAEA" LegendWidth="15" MainBackgroundColor="#EAEAEA" MainBorderColor="#EAEAEA" MaxRange.1="120.0" PenColor.1="#BE64FF" PenColor.2="#940044" PenColor.3="#FFFF9B" PenColor.4="#60FFF0" PenColor.6="#FF0000" SaveDate="11/20/2007 11:05:26" ShowHorizontalGrid="false" ShowTagDescription="false" ShowTimeControl="false" ShowVerticalGrid="false" TitleColor="#D17900" TitleFontSize="12" TitleFontStyle="1" UseGlobalDecimals="true" ValueColumns="ElapsedTime" Version="11.5.3" VerticalGridColor="#CE6523" XAxisDateFormat="MM/dd" XAxisFontSize="10" XAxisLabelColor="#000000" XAxisMajorTickCount="1" XAxisMinorTickCount="1" XAxisNumberFormat="0" XAxisShowLabels="false" XAxisTickColor="#EAEAEA" XAxisTickHighlightColor="#EAEAEA" XAxisTicksPerLabel="1" XAxisTimeFormat="" XAxisWidth="10" YAxisDateFormat="MM-dd" YAxisFontSize="10" YAxisLabelColor="#000000" YAxisNumberFormat="0" YAxisTickColor="#EAEAEA" YAxisTickHighlightColor="#FFFFFF" YAxisTicksPerLabel="1" YAxisUsePenColor="false" ZeroBasedScale="true"/>

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 11:40 AM

    You need to "interpolate" the dataset to ensure that each date/reason combination has a value, even if that value is zero.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Bassam Lubbad

      No, they don't have to be separate columns.

      If you use the data mapping tab in the display template editor, you can assign the reason code column to the "Label Column", and the date column to the "Axis Label Column", and the time column to the "Value Column".

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 06:11 AM

    Hi Bassam,

    I feel that the problem is with your query template. Are you able to segregate the result based on days in query template??

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.