« December 2010 | Main | February 2011 »

The Chart Part .XSD file

As you all will probably know in Dynamics NAV 2009 there are 2 types of charts that a user can add to a page. By the way, if you don't know this, it might be a good opportunity to follow a training here J

So, there are Chart Parts and Chart Panes. What's the difference?

The Chart Pane

A Chart Pane is available on any List page. The user can click on the Customize button (right top of RTC) and select the "Chart Pane".

Then you can select a measure and one or two dimension fields, and so 'draw' your chart.

This Chart Pane is a part of the user's personalization settings, so when you restart the RTC the chart will be gone. This is not a bad thing, because the Chart is not filtered and might be causing negative effects on performance.

The Chart Part

A Chart Part is available on any Role Center page and on any page where it is foreseen by the developer. If there's a chart part available, then the user can add it via Customize This Page:

It's the Chart Part that this blog article is about.

Basically the Chart is coming out of the Chart table. To create a new Chart in the Chart table, an XML file has to be created and imported in this table. You can either create this .xml file manually using a text editor, or you can use the Chart Generator tool, which you can find and download on the "NAV Developer Team Blog" website.

So what's the problem?

Well, there's no documentation on how to create the XML file and all of the possibilities. Until now that is…

When Dynamics NAV 2009 R2 was released, I found something interesting on the product DVD: DVD_BUILD32012.zip\Documentation\Utility\ChartMetaData.xsd.

It seems to be the XML Schema for the Chart.xml object, interesting, not? I'm not going to copy/past the complete .xsd schema here, but just some interesting things I found in there.

First thing I noticed that you can provide a Key attribute to the Chart definition. This Key is then probably used for sorting, and might also produce better performance.

Secondly, the above screenshot shows that you can have 3 types of Charts: Column, Point and Line. And yes, it works, if you use Line this is what you get:

Then there the ChartMeasureOperator:

So here we have 2 new options: Relative and RelativePct, with results like this:

  • Relative:

  • RelativePct:

Relative can be used to compare values on a scale between 0 and 1, RelativePct will do the same on a scale between 0 and 100%.

Of course, the Charts are only as meaningful as the data they present, but I think this is an interesting peace of documentation that can be found now on the product DVD. There's no documentation about the .XSD file (although not to my knowledge), but at least we now have an .XSD file…



October 2011
Mon Tue Wed Thu Fri Sat Sun
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

powered by FreeFind
© 2005 Plataan bvba | info@plataan.be