Tooltip on sparkline represents the wrong marker value

I've added multiple sparklines to a report, each representing a trend over the last 12 months. Each month has marker on the sparkline and each marker has a tooltip. The sparkline correctly represents the month's value, but the tooltip shows the wrong month (a month later).

ie:

- i have a sparkline representing Januari 2014 to December 2014

- The line and the markers go up and down correctly according to the values of each month so that the third marker represents the value for march 2014.

- The tooltip (which contains the month and the value of that month) contains the value of one month later. So the tooltip of the third marker, shows april 2014 and the value belonging to april in stead of march 2014 and the value belonging to march.

Is this a known issue? And is there a workaround for this?

- Matthijs

March 20th, 2015 1:08pm

Hi Matthijs,

I have created the sample report with Sparkline chart with your case, Its working fine as shown in below screen.

Tooltip Expression:- =cstr(Fields!MONTH.Value )+" , "+ cstr(Fields!VALUE.Value)

If you want to debug your sparkline chart, with axix values so that you can check its proper X and Y axis value the marker tooltip is showing or not, you can just convert your chart to Full chart as shown in below screen, take backup of report first and then do it.

Here is my Sample RDL file Code, Check it. If possible can you provide your tooltip expression?

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
  <Body>
    <ReportItems>
      <Textbox Name="textbox1">
        <CanGrow>true</CanGrow>
        <KeepTogether>true</KeepTogether>
        <Paragraphs>
          <Paragraph>
            <TextRuns>
              <TextRun>
                <Value>Sparkline</Value>
                <Style>
                  <FontFamily>Tahoma</FontFamily>
                  <FontSize>12pt</FontSize>
                  <FontWeight>Bold</FontWeight>
                  <Color>SteelBlue</Color>
                </Style>
              </TextRun>
            </TextRuns>
            <Style>
              <TextAlign>Center</TextAlign>
            </Style>
          </Paragraph>
        </Paragraphs>
        <rd:DefaultName>textbox1</rd:DefaultName>
        <Height>0.37in</Height>
        <Width>5in</Width>
        <Style>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <PaddingBottom>2pt</PaddingBottom>
        </Style>
      </Textbox>
      <Chart Name="Sparkline1">
        <ChartCategoryHierarchy>
          <ChartMembers>
            <ChartMember>
              <Group Name="Sparkline1_CategoryGroup">
                <GroupExpressions>
                  <GroupExpression>=Fields!MONTH.Value</GroupExpression>
                </GroupExpressions>
              </Group>
              <SortExpressions>
                <SortExpression>
                  <Value>=Fields!MONTH.Value</Value>
                </SortExpression>
              </SortExpressions>
              <Label>=Fields!MONTH.Value</Label>
            </ChartMember>
          </ChartMembers>
        </ChartCategoryHierarchy>
        <ChartSeriesHierarchy>
          <ChartMembers>
            <ChartMember>
              <Group Name="Sparkline1_SeriesGroup">
                <GroupExpressions>
                  <GroupExpression>=Fields!ID.Value</GroupExpression>
                </GroupExpressions>
              </Group>
              <SortExpressions>
                <SortExpression>
                  <Value>=Fields!ID.Value</Value>
                </SortExpression>
              </SortExpressions>
              <Label>=Fields!ID.Value</Label>
            </ChartMember>
          </ChartMembers>
        </ChartSeriesHierarchy>
        <ChartData>
          <ChartSeriesCollection>
            <ChartSeries Name="VALUE">
              <ChartDataPoints>
                <ChartDataPoint>
                  <ChartDataPointValues>
                    <Y>=Sum(Fields!VALUE.Value)</Y>
                  </ChartDataPointValues>
                  <ChartDataLabel>
                    <Style />
                    <UseValueAsLabel>true</UseValueAsLabel>
                  </ChartDataLabel>
                  <ToolTip>=cstr(Fields!MONTH.Value )+" , "+ cstr(Fields!VALUE.Value)</ToolTip>
                  <Style />
                  <ChartMarker>
                    <Type>Auto</Type>
                    <Style />
                  </ChartMarker>
                  <DataElementOutput>Output</DataElementOutput>
                </ChartDataPoint>
              </ChartDataPoints>
              <Type>Line</Type>
              <Style />
              <ChartEmptyPoints>
                <Style />
                <ChartMarker>
                  <Style />
                </ChartMarker>
                <ChartDataLabel>
                  <Style />
                </ChartDataLabel>
              </ChartEmptyPoints>
              <ValueAxisName>Primary</ValueAxisName>
              <CategoryAxisName>Primary</CategoryAxisName>
              <ChartSmartLabel>
                <CalloutLineColor>Black</CalloutLineColor>
                <MinMovingDistance>0pt</MinMovingDistance>
              </ChartSmartLabel>
            </ChartSeries>
          </ChartSeriesCollection>
        </ChartData>
        <ChartAreas>
          <ChartArea Name="Default">
            <ChartCategoryAxes>
              <ChartAxis Name="Primary">
                <Visible>False</Visible>
                <Style>
                  <FontSize>8pt</FontSize>
                </Style>
                <ChartAxisTitle>
                  <Caption>Axis Title</Caption>
                  <Style>
                    <FontSize>8pt</FontSize>
                  </Style>
                </ChartAxisTitle>
                <ChartMajorGridLines>
                  <Enabled>False</Enabled>
                  <Style>
                    <Border>
                      <Color>Gainsboro</Color>
                    </Border>
                  </Style>
                </ChartMajorGridLines>
                <ChartMinorGridLines>
                  <Style>
                    <Border>
                      <Color>Gainsboro</Color>
                      <Style>Dotted</Style>
                    </Border>
                  </Style>
                </ChartMinorGridLines>
                <ChartMinorTickMarks>
                  <Length>0.5</Length>
                </ChartMinorTickMarks>
                <CrossAt>NaN</CrossAt>
                <Minimum>NaN</Minimum>
                <Maximum>NaN</Maximum>
                <ChartAxisScaleBreak>
                  <Style />
                </ChartAxisScaleBreak>
              </ChartAxis>
              <ChartAxis Name="Secondary">
                <Visible>False</Visible>
                <Style>
                  <FontSize>8pt</FontSize>
                </Style>
                <ChartAxisTitle>
                  <Caption>Axis Title</Caption>
                  <Style>
                    <FontSize>8pt</FontSize>
                  </Style>
                </ChartAxisTitle>
                <Margin>False</Margin>
                <ChartMajorGridLines>
                  <Enabled>False</Enabled>
                  <Style>
                    <Border>
                      <Color>Gainsboro</Color>
                    </Border>
                  </Style>
                </ChartMajorGridLines>
                <ChartMinorGridLines>
                  <Style>
                    <Border>
                      <Color>Gainsboro</Color>
                      <Style>Dotted</Style>
                    </Border>
                  </Style>
                </ChartMinorGridLines>
                <ChartMinorTickMarks>
                  <Length>0.5</Length>
                </ChartMinorTickMarks>
                <CrossAt>NaN</CrossAt>
                <Location>Opposite</Location>
                <Minimum>NaN</Minimum>
                <Maximum>NaN</Maximum>
                <ChartAxisScaleBreak>
                  <Style />
                </ChartAxisScaleBreak>
              </ChartAxis>
            </ChartCategoryAxes>
            <ChartValueAxes>
              <ChartAxis Name="Primary">
                <Visible>False</Visible>
                <Style>
                  <FontSize>8pt</FontSize>
                </Style>
                <ChartAxisTitle>
                  <Caption>Axis Title</Caption>
                  <Style>
                    <FontSize>8pt</FontSize>
                  </Style>
                </ChartAxisTitle>
                <ChartMajorGridLines>
                  <Style>
                    <Border>
                      <Color>Gainsboro</Color>
                    </Border>
                  </Style>
                </ChartMajorGridLines>
                <ChartMinorGridLines>
                  <Style>
                    <Border>
                      <Color>Gainsboro</Color>
                      <Style>Dotted</Style>
                    </Border>
                  </Style>
                </ChartMinorGridLines>
                <ChartMinorTickMarks>
                  <Length>0.5</Length>
                </ChartMinorTickMarks>
                <CrossAt>NaN</CrossAt>
                <Minimum>NaN</Minimum>
                <Maximum>NaN</Maximum>
                <ChartAxisScaleBreak>
                  <Style />
                </ChartAxisScaleBreak>
              </ChartAxis>
              <ChartAxis Name="Secondary">
                <Visible>False</Visible>
                <Style>
                  <FontSize>8pt</FontSize>
                </Style>
                <ChartAxisTitle>
                  <Caption>Axis Title</Caption>
                  <Style>
                    <FontSize>8pt</FontSize>
                  </Style>
                </ChartAxisTitle>
                <ChartMajorGridLines>
                  <Style>
                    <Border>
                      <Color>Gainsboro</Color>
                    </Border>
                  </Style>
                </ChartMajorGridLines>
                <ChartMinorGridLines>
                  <Style>
                    <Border>
                      <Color>Gainsboro</Color>
                      <Style>Dotted</Style>
                    </Border>
                  </Style>
                </ChartMinorGridLines>
                <ChartMinorTickMarks>
                  <Length>0.5</Length>
                </ChartMinorTickMarks>
                <CrossAt>NaN</CrossAt>
                <Location>Opposite</Location>
                <Minimum>NaN</Minimum>
                <Maximum>NaN</Maximum>
                <ChartAxisScaleBreak>
                  <Style />
                </ChartAxisScaleBreak>
              </ChartAxis>
            </ChartValueAxes>
            <Style>
              <BackgroundColor>#00ffffff</BackgroundColor>
              <BackgroundGradientType>None</BackgroundGradientType>
            </Style>
          </ChartArea>
        </ChartAreas>
        <Palette>BrightPastel</Palette>
        <ChartBorderSkin>
          <Style>
            <BackgroundColor>Gray</BackgroundColor>
            <BackgroundGradientType>None</BackgroundGradientType>
            <Color>White</Color>
          </Style>
        </ChartBorderSkin>
        <ChartNoDataMessage Name="NoDataMessage">
          <Caption>No Data Available</Caption>
          <Style>
            <BackgroundGradientType>None</BackgroundGradientType>
            <TextAlign>General</TextAlign>
            <VerticalAlign>Top</VerticalAlign>
          </Style>
        </ChartNoDataMessage>
        <rd:DesignerMode>Sparkline</rd:DesignerMode>
        <DataSetName>DataSet1</DataSetName>
        <Top>0.63in</Top>
        <Left>0.405in</Left>
        <Height>2.45in</Height>
        <Width>4.375in</Width>
        <ZIndex>1</ZIndex>
        <Style>
          <Border>
            <Color>LightGrey</Color>
            <Style>Solid</Style>
          </Border>
          <BackgroundColor>White</BackgroundColor>
          <BackgroundGradientType>None</BackgroundGradientType>
        </Style>
      </Chart>
    </ReportItems>
    <Height>3.225in</Height>
    <Style />
  </Body>
  <Width>5in</Width>
  <Page>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
  </Page>
  <AutoRefresh>0</AutoRefresh>
  <DataSources>
    <DataSource Name="DataSource1">
      <DataSourceReference>DataSource1</DataSourceReference>
      <rd:SecurityType>None</rd:SecurityType>
      <rd:DataSourceID>6abd5341-c043-4ab1-b449-c32e00efc4ac</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <DataSets>
    <DataSet Name="DataSet1">
      <Query>
        <DataSourceName>DataSource1</DataSourceName>
        <CommandText>SELECT 1 ID, 1 MONTH, 50 VALUE
UNION  
SELECT 1 ID, 2 MONTH, 30 VALUE
UNION
SELECT 1 ID, 3 MONTH, 20 VALUE
UNION  
SELECT 1 ID, 4 MONTH, 10 VALUE
UNION  
SELECT 1 ID, 5 MONTH, 25 VALUE
UNION
SELECT 1 ID, 6 MONTH, 50 VALUE
UNION  
SELECT 1 ID, 7 MONTH, 10 VALUE
UNION  
SELECT 1 ID, 8 MONTH, 20 VALUE
UNION
SELECT 1 ID, 9 MONTH, 30 VALUE
UNION  
SELECT 1 ID, 10 MONTH, 40 VALUE
UNION  
SELECT 1 ID, 11 MONTH, 45 VALUE
UNION
SELECT 1 ID, 12 MONTH, 50 VALUE
UNION  
SELECT 2 ID, 1 MONTH, 25 VALUE
UNION  
SELECT 2 ID, 2 MONTH, 30 VALUE
UNION
SELECT 2 ID, 3 MONTH, 10 VALUE
UNION  
SELECT 2 ID, 4 MONTH, 30 VALUE
UNION  
SELECT 2 ID, 5 MONTH, 45 VALUE
UNION
SELECT 2 ID, 6 MONTH, 35 VALUE
UNION  
SELECT 2 ID, 7 MONTH, 10 VALUE
UNION  
SELECT 2 ID, 8 MONTH, 50 VALUE
UNION
SELECT 2 ID, 9 MONTH, 20 VALUE
UNION  
SELECT 2 ID, 10 MONTH, 14 VALUE
UNION  
SELECT 2 ID, 11 MONTH, 40 VALUE
UNION
SELECT 2 ID, 12 MONTH, 45 VALUE</CommandText>
        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
      </Query>
      <Fields>
        <Field Name="ID">
          <DataField>ID</DataField>
          <rd:TypeName>System.Int32</rd:TypeName>
        </Field>
        <Field Name="MONTH">
          <DataField>MONTH</DataField>
          <rd:TypeName>System.Int32</rd:TypeName>
        </Field>
        <Field Name="VALUE">
          <DataField>VALUE</DataField>
          <rd:TypeName>System.Int32</rd:TypeName>
        </Field>
      </Fields>
    </DataSet>
  </DataSets>
  <Language>en-US</Language>
  <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
  <rd:ReportUnitType>Inch</rd:ReportUnitType>
  <rd:ReportID>59e8101c-8585-409d-82e7-c6719e928567</rd:ReportID>
</Report>

Thanks
Prasad
------------------------------------------------------------
Mark this as Answer if it helps you to proceed on further.

Free Windows Admin Tool Kit Click here and download it now
March 21st, 2015 10:02pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics