Question

In my onet.xml I have a ChartWebPart. When I create a site, my ChartWebPart is filled with random data. Users get confused.

How to create an empty ChartWebPart which users can connect to their data?

        <AllUsersWebPart WebPartOrder="1" WebPartZoneID="TopRight">
      <![CDATA[
        <webParts>
        <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
          <metaData>
            <type name="Microsoft.Office.Server.WebControls.ChartWebPart, Microsoft.Office.Server.Chart, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
            <importErrorMessage>Det går inte att importera den här webbdelen.</importErrorMessage>
          </metaData>
          <data>
            <properties>
              <property name="RealTimeInterval" type="int">0</property>
              <property name="Height" type="unit" />
              <property name="IsCustomized" type="bool">True</property>
              <property name="ListUrl" type="string" null="true" />
              <property name="AllowConnect" type="bool">True</property>
              <property name="CatalogIconImageUrl" type="string" />
              <property name="Title" type="string">Diagram</property>
              <property name="Hidden" type="bool">False</property>
              <property name="ShowDebugInfoRuntime" type="bool">False</property>
              <property name="BindToDataDesignMode" type="bool">True</property>
              <property name="TitleIconImageUrl" type="string" />
              <property name="ChromeState" type="chromestate">Normal</property>
              <property name="Description" type="string" />
              <property name="ChartXml" type="string"></property>
              <property name="AllowMinimize" type="bool">True</property>
              <property name="ChromeType" type="chrometype">None</property>
              <property name="AlignDataPointsByAxisLabel" type="bool">False</property>
              <property name="AllowZoneChange" type="bool">True</property>
              <property name="DataBindingsString" type="string">&lt;?xml version="1.0" encoding="utf-16"?&gt;
      &lt;ArrayOfDataBinding xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /&gt;</property>
              <property name="ShowToolbar" type="bool">True</property>
              <property name="Width" type="unit" />
              <property name="HelpMode" type="helpmode">Navigate</property>
              <property name="TitleUrl" type="string" />
              <property name="DesignerTemplateId" type="string">Column2D</property>
              <property name="HelpUrl" type="string" />
              <property name="ExportMode" type="exportmode">All</property>
              <property name="ConnectionPointEnabled" type="bool">True</property>
              <property name="AllowClose" type="bool">True</property>
              <property name="AllowEdit" type="bool">True</property>
              <property name="Direction" type="direction">NotSet</property>
              <property name="AllowHide" type="bool">True</property>
              <property name="DesignerChartTheme" type="Microsoft.Office.Server.Internal.Charting.Utilities.ChartTheme, Microsoft.Office.Server.Chart, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">BrightPastel</property>
            </properties>
          </data>
        </webPart>
      </webParts>
      ]]>
    </AllUsersWebPart>
Was it helpful?

Solution

You could use an empty list as a data source, but this will yield a completely blank chart canvas, i.e. an empty square. I'm guessing that users could get confused by that too though, perhaps more.

One thing I've learnt is that a bit of education on the "dummy" data in the web-part being for illustration purposes only would go a long way to solving your problem.

Remove the confusion, remove the problem! :D

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top