How to Enable Chart Web Part in SharePoint 2013?

As per Microsoft, the Chart web part in SharePoint 2013 has been discontinued, So, the chart web part will be missing! Of course, there are many 3rd party products available to bring Chart functionality in SharePoint 2013, is it possible to resurrect the same old chart Web part in SharePoint 2013? Yes! We can!! Here is how to enable chart web part in SharePoint 2013:

Disclaimer:
I’m not sure if this is a fully supported method, but it serves the purpose!

Step 1: Save this below chunk as a “Chart.Webpart” file

<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>Cannot import Chart Web Part.</importErrorMessage>
    </metaData>
    <data>
      <properties>
        <property name="RealTimeInterval" type="int">0</property>
        <property name="Height" type="unit" />
        <property name="IsCustomized" type="bool">False</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">Chart Web Part - www.SharePointDiary.com</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">Helps you to visualize your data on SharePoint sites and portals.</property>
        <property name="ChartXml" type="string"><?xml version="1.0" encoding="utf-16"?>
<Chart BorderColor="26, 59, 105" BorderWidth="1" BorderlineDashStyle="Solid">
  <Series>
    <Series Name="Default" ShadowOffset="2" ChartArea="Default" BorderColor="26, 59, 105">
    </Series>
  </Series>
  <ChartAreas>
    <ChartArea BackColor="White" ShadowOffset="2" BorderColor="26, 59, 105" BorderDashStyle="Solid" Name="Default">
      <AxisY>
        <MajorGrid LineColor="Silver" />
        <MinorGrid LineColor="Silver" />
      </AxisY>
      <AxisX>
        <MajorGrid LineColor="Silver" />
        <MinorGrid LineColor="Silver" />
      </AxisX>
      <AxisX2>
        <MajorGrid LineColor="Silver" />
        <MinorGrid LineColor="Silver" />
      </AxisX2>
      <AxisY2>
        <MajorGrid LineColor="Silver" />
        <MinorGrid LineColor="Silver" />
      </AxisY2>
    </ChartArea>
  </ChartAreas>
  <BorderSkin BackColor="CornflowerBlue" BackSecondaryColor="CornflowerBlue" />
</Chart></property>
        <property name="WorkBookUrl" type="string" null="true" />
        <property name="AllowMinimize" type="bool">True</property>
        <property name="ChromeType" type="chrometype">Default</property>
        <property name="AlignDataPointsByAxisLabel" type="bool">False</property>
        <property name="AllowZoneChange" type="bool">True</property>
        <property name="DataBindingsString" type="string"><?xml version="1.0" encoding="utf-16"?>
<ArrayOfDataBinding xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></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" />
        <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>

Or you can download this zip and extract the chart.webpart file:

BTW, I exported this from SharePoint 2010!

The Next step is to enable chart web part in SharePoint 2013.

  • Go to Site Settings >> Click on the “Web Parts” link under the “Web Designer Galleries” section.
  • On the “Files” tab, click on “Upload Document”
  • Locate the “Chart.webpart” file and specify web part attributes.
how to enable chart web part in sharepoint 2013

Step 3: Add chart web part to SharePoint 2013 page:

So, now we have the web part ready! Navigate to any page where you want to add a chart web part, click on “Web Part” from the “Insert” tab, Choose “Chart Web Part” and click “OK”.
chart web part in sharepoint 2013
Configure Data connections and other properties of the chart, and here is the output:
how to create chart web part in sharepoint 2013
This chart web part also works in SharePoint 2016 and SharePoint Online too!

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

22 thoughts on “How to Enable Chart Web Part in SharePoint 2013?

  • August 8, 2018 at 10:21 PM

    successfully connected my list, how do I filter for created & last 30 days? what would be appropriate default value?

    Reply
  • April 26, 2018 at 10:24 AM

    I have created a list with 3 columns, title , count (default value is 1) and status as “open” & “resolved”.
    i have set the Y field as count, x field as status and group by field as count
    suppose i have 3 entries with two line item with status as resolved and one as open then the graph that i see is 3 columns on x axis as “resolved” resolved & open” and on y axis it show bar to 1 unit. Please help me find out how do i get the correct graph. Do you have any documentation to refer ?

    Reply
  • January 12, 2018 at 5:09 AM

    Wooowww. Great help Bro!! serves the Purpose!!

    Reply
  • December 19, 2017 at 3:04 PM

    Great solution, works!
    Thanks

    Reply
  • December 1, 2017 at 6:06 PM

    You can download the webpart from here: https://goo.gl/1pyqNb

    Reply
  • October 14, 2017 at 3:18 PM

    I just copied the text into a .txt file and it worked first time.

    Reply
    • October 30, 2017 at 8:30 PM

      Did you save as a webpart file after copying into a .txt file? This is where I am stumped. I can’t save it as a webpart file.

      Reply
    • October 30, 2017 at 8:30 PM

      Did you do anything special to save as a webpart file from the .txt file?

      Reply
  • July 10, 2017 at 8:11 AM

    Guy’s,It’s working.

    Reply
  • June 19, 2017 at 3:35 PM

    Guys to make this work you need to modify the 3 “xmlns” values. Shorten them to ONLY the URL, and delete all the HTML tags like “a” and “span” etc. They’re on lines 2 and 56.

    Reply
    • July 5, 2017 at 4:21 PM

      Give an example please

      Reply
    • October 9, 2017 at 10:20 PM

      Line 2:

      Line 56:

      Reply
  • March 24, 2017 at 5:45 AM

    Hey! Worked a treat for me – opened in xml editor, pasted data as above and saveas xml type and given the name “Chart.Webpart” – Upload to SP2013 and loaded onto a page and worked. Great! thanks.

    Reply
  • March 24, 2017 at 1:21 AM

    didn’t work for me as well

    Reply
  • March 23, 2017 at 5:04 PM

    Trying to use code but get the not well formed xml. Any ideas?

    Reply
  • March 3, 2017 at 9:19 AM

    After configuring chart webpart data connection nothing comes up. It always shows blank page. Any idea?

    Reply
  • February 28, 2017 at 11:53 PM

    I’m getting the same poorly formed xml error mentioned above. I pasted the xml into a xml checker online, and it said it was valid. Anyone know what is going on here?

    Reply
  • December 28, 2016 at 10:40 PM

    Hi, When i tried in sharepoint online, I got error message like “The file you imported is not valid. Verify that the file is web part description file(*.webpart or *.dwp) and that contains proper xml file”

    But i tried with .webpart and .dwp. still getting the same error.

    Reply
  • July 20, 2016 at 7:39 AM

    This is awesome! Thanks Mr Salaudeen!

    Reply
  • July 19, 2016 at 5:09 PM

    HI, i importet web part no problewm,buti got problem that anything that i click i get error something went wrong.

    Reply
  • June 15, 2016 at 12:19 PM

    I also get an error about XML not correct. I pasted the code into Notepad and get all lines intersected with blank lines, but that couldn’t cause the problem, could it?

    Reply
  • February 13, 2016 at 8:42 PM

    Hi Salaudeen, this looks promising but when I copy and try and use I get a poorly formed xml error. Can you post the actual file for download?
    Thanks,
    Bryan

    Reply

Leave a Reply