So I Went With ComponentOne

ITSBITS
Written byWallace Allison, Director at ITSBITS by IHS, Incorporated
Websitehttp://www.itsbits.com
Technologies UsedWindows 8, ComponentOne Chart for WinRT XAML
View the PDFSo I Went With ComponentOne

For the last four months we’ve been working hard to produce our first Windows® 8 applications. It’s an entirely new paradigm if you’re a developer, and there’s a pretty steep learning curve involved if you’re doing more than adding just a few bits to the Visual Studio® template. We’ll discuss more on this transitional effort in the coming days, but for now, let’s leave it at that.

Windows 8 Development: ComponentOne Chart for WinRT XAML
"Burn The Mortgage!" Application

We reached a point where we knew we needed to add some eye candy - the program did its main functions quickly, accurately, and with a minimum of user effort, but it lacked the visual appeal to make it appear desirable to potential customers, especially in a consumer market place. At that point, we began looking around. Sure we could build our own “component” to do the job. We’ve always done that before. This time, however, I encountered some folks at CodeStock in Knoxville. They’re nice, sharp guys and we talked about a number of things, including the possibility of utilizing someone else's controls/components. They spoke highly of two different vendors, so we decided, based upon this, to dig deeper into the possibilities.

Our primary concerns was time. First, we wanted to get our software done as soon as possible so we can have it available for purchase before the Christmas rush. Second, we wanted to be sure to take the most economically beneficial method of achieving our goals. Sure, we could develop it, but how long would it be before the cost exceeded the cost of using a third-party vendor’s software. The question boiled down to this: can we use a third-party vendor’s “stuff” cheaper and with as much accuracy as we could develop our own? If the question was a slight, “Yes,” we might still roll our own. But, if the question was a resounding “No” we wanted to try the third-party route.

I spoke with representatives from both of the recommended vendors both at CodeStock in Knoxville and again at DevLink in Chatanooga as well as folks from a couple of others. We obtained typical licensing prices from these two vendors. The results were promising. One of the two vendors gave us right-to-use licenses right now because their Windows 8 setup was still in beta and they wanted feedback. The other, made no such offer up front, but their prices still made it economically attractive, especially considering our time element, and since Windows 8 was still in beta at the time, the same kind of deal was offered.

Windows 8 Development: ComponentOne Studio for WinRT XAML
ComponentOne Studio for WinRT XAML

By the time of DevLink we had already decided on and had begun working with the free components as our first choice to try - hey, wouldn’t you? At first, it seemed great! The graphing control we wanted to use set up and in about a day we had an initial trial up and working. The control looked good--not great, but good enough. Its accuracy was fine. We were looking at what appeared to be a great success. Then we noticed a little problem. We needed to have a graph that would change if we changed the input data. Since the chart’s examples used an observable collection, we fully expected it to do just that. The theory was that it would “observe” the incoming collection of data and when it changed, so would the graph. The truth was a disappointment - the graph didn’t change. Even if we “wired” it to a fixed array and tried to redraw the graph after changing the data it was static and unchanging. Remembering it was in beta, we decided to give it a chance, but to begin looking at ComponentOne’s stuff at the same time. At that point, we sent emails asking for the first vendor’s help. We can’t blame them for the fact that we had a problem in our email server and it dumped their responses into a black spam hole from which they have never and will never emerge. Faced with what appeared to be no response, I phoned their representative and asked for help. He informed me that he was on his way to Bulgaria, the company had a lot going on, etc., etc. Some two days later, we finally got an email from their support folks. Basically, it asked, “What’s going on?” (Let’s hope they make it dynamic when it comes out of beta.)

Meantime, faced with an unsuccessful trial using the first third-party vendor’s stuff, we immediately turned to our second third-party vendor, ComponentOne, and spun up a trial using their stuff. In less than a day, start to finish, we had an initial trial up and working well. Needless to say, we were far more skeptical this time - we were not nearly as ready to embrace it as a success - so we tested it a lot more. Then, we tested it some more. We added features as we learned about them, and it just got better. After hours of testing our code and the ComponentOne control, we were satisfied... this was more like it. The control is a bit easier to use than that of the competitor proved to be - see the code lines below - and if you feed it a different set of data and let it re-graph, it is dynamic. The graph changes with it as you’d expect.

Oh, and did I mention that we had a question or two as we went through all this? Having never seen ComponentOne’s stuff before and with time as a major element of concern, it seemed prudent to contact their support folks and ask them our questions rather than just trying to figure it all out by ourselves. In well under 24 hours, I had a response. We had already found most of our answers online by then, but they hung loosely with us until we were happy that we had met our needs and were happy with it all...just what they should all do.

As you may have guessed by the title, I went with ComponentOne over the competition. The name of our app is “Burn The Mortgage!” It’s from ITSBITS® and you’ll soon be able to download it to your sizzling-fast new Windows 8 tablet and figure out how to save lots of money on your house payments.

ComponentOne-specific Xaml

xmlns:C1Chart=”using:C1.Xaml.Chart”
<!-- here’s the ComponentOne Chart control -->
<C1Chart:C1Chart Margin=”10,30.5,54,1394” Grid.Row=”1” Name=”c1Chart1” ChartType=”ColumnStacked” Grid.Column=”1”
Palette=”Equity” Height="500" Width=”600”>
<C1Chart:C1ChartLegend Background=”Transparent” BorderBrush=”Transparent” /> </C1Chart:C1Chart>

ComponentOne-specific C#

using C1.Xaml.Chart;
c1Chart1.Data.Children.Clear();
//Create a single-series for our two layers--principle and interest. Also label the two while at it.
DataSeries ds1 = new DataSeries();
ds1.Label = "Principle";
DataSeries ds2 = new DataSeries();
ds2.Label = "Interest";
//init values for setup
nt64[] PriceP = { 0,0,0,0,0,0,0,0,0,0 };
Int64[] PriceI = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
String[] sColumnNames = { " ", " ", " ", " ", " ", " ", " ", " ", " ", " " };
c1Chart1.View.AxisY.Min = 0;
c1Chart1.View.AxisY.Max = none;
c1Chart1.View.AxisY.MajorUnit = Convert.ToInt64(nOne * .1);

For each value we’re going to graph, we’re in a do loop and we set values as:

PriceP[nJ] = nYPrinciple;
PriceI[nJ] = nYInterest;

Then:

//set price data
ds1.ValuesSource = PriceP;
ds2.ValuesSource = PriceI;
//add series to the chart
c1Chart1.Data.Children.Add(ds1);
c1Chart1.Data.Children.Add(ds2);
//add item names
c1Chart1.Data.ItemNames = sColumnNames;
//set chart type
c1Chart1.ChartType = ChartType.ColumnStacked;
//financial formatting
c1Chart1.View.AxisX.AnnoFormat = “c”;
//axis annotation rotation
c1Chart1.View.AxisX.AnnoAngle = 60;
//adjust the chart’s color scheme appearance
c1Chart1.Palette = Palette.Metro;
c1Chart1.Theme = ChartTheme.MediaPlayer;