Engineering notation axis labels

Charts for WPF Forum

Posted 6 years ago by Ed Starkey
Version: 13.1.0581
Avatar

Is it possible to use the LabelFormat to set engineering notation axis labels? In addition, how does the graph autoscaling routines work with x/y values less than 1? I ask these questions because they are specific limitations of a competing product, and I am looking for an alternative.

 

Thanks.

Comments (7)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ed,

Can you provide some more detail (perhaps via examples) of what you are looking for here, and even some detail on the limitations of the competitor in this area?  Then we can better answer your question and possibly think of some future enhancement ideas as needed.  Thanks!


Actipro Software Support

Posted 6 years ago by Ed Starkey
Avatar

The competitor does not have an axis label filter property to handle engineering notation, just exponential notation. I can display 10 -E5 but (scientific notation), but I want to display 100 -E6 (engineering notation).

A bug in their auto scaling algorithm prevents auto scaling of any data less than 1 on X or Y axes. We have huge amounts of scientific data that most often is less than one, and this forces me to handle all of the auto scaling myself.

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ed,

Because .NET does not have a built-in format string for engineering notation, you cannot use the LabelFormat property, but you can use our LabelFunc property to provide a custom format. I testing it briefly using some sample code for engieering notation formatting:  

Here you can see I've used the LabelFunc property on XYDoubleAxis to provide custom formatting. In this case, the only values I'm providing are TickMajorInterval and TickMinorInterval:

<charts:XYDoubleAxis AreMajorTicksVisible="True" AreMinorTicksVisible="True"
TickMajorInterval="0.000001" TickMinorInterval="0.0000005"
LabelFunc="{Binding LabelFunction}"/>

I'm not clear exactly what you mean by scaling, but as you can see in the code block, the Minimum and Maximum values are determined automatically and do not need to be specified, even when the values are all below one.

For examples of all of this, you can download our trial and check out the Axis QuickStart in our SampleBrowser application. Please let us know if you have any additional questions or clarifications.


Actipro Software Support

Posted 6 years ago by Ed Starkey
Avatar

This looks very promising! Can i also bind data to a series from a column in a DataTable?

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ed,

Without seeing the structure of that data it's hard to say, but I have no reason to think it wouldn't, as long as the data is the object you're binding to or is exposed as a property. Basically you can bind XYSeriesBase.ItemsSource to a collection of objects, and then use XPath and YPath to navigate to a property on those objects. XPath and YPath can traverse n properties deep, for example:

XPath="AccountRep.Address.ZipCode"

I would encourage you to download the trial and try it out on your data. Please let us know if you have any additional questions. Thanks for your interest!

[Modified 6 years ago]


Actipro Software Support

Posted 6 years ago by Ed Starkey
Avatar

Well, that's the rub: My data is completely dynamic. The only thing I know is it is contained inside a flat DataTable object. I tried setting a series.Itemsource property to the DefaultView of the DataTable, but when I specify the Column name, nothing is bound.

Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ed,

We currently are working on automatic tick interval calculation if you don't specify tick intervals via TickMajorInterval/TickMinorInterval.  I believe we have it working for small numbers like this too, which will work great for your dynamic data scenarios.  It would be helpful if we could get your eyes on it as well to help test it.  If you would like to help test, please write our support address and mention this thread.  Thanks!


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 14 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.