Object Hierarchy For Charting?

Jan 27, 2009

I'm looking for advice to make my code efficient in terms of execution speed and memory usage. Basically, how to lay out my objects. The program displays parts of several data series in bar- or line- charts, as well as calculated series based on these data series. The key user input will be to change what part of data series to look at, and that input should trigger instant chart update, with minimal lag.

[Code]...

View 10 Replies


ADVERTISEMENT

Flattening An Object Hierarchy Using A Shim Class - Initializing Derived Object Properties From The Base Object?

Jul 10, 2010

I am somewhat new to object oriented programming and am attempting to flatten a Linq object hierarchy by using a shim class.how to initalize a derived class with property values from a base class?I have two objects, a base object with about 100 properties, and a derived object which inherits from the base object and adds a few additional properties beyond those of the base object. My simple constructor creates the derived object, but I am looking for a way to initialize the derived object properties with values from the base object.Right now I am using reflection to iterate over the properties individually and I suspect there may be a better way. The following example shows my shim class constructor for the derived class, and two properties:

newProperty1 - a new string property of the derived class

flattenedProperty2 - a new string property of the derived class, copied from a 2nd-level object of the base class

Code example:

Public Class derivedObj
Inherits baseObj
Private _newProperty1 As String[code].......

Is this the correct constructor approach to flatten the object hierarchy using a shim class? My second question relates to initialization of properties in the derived class. The constructor above creates the derived object, but what is the best way to initialize the derived object properties with values from the base object? The following code uses reflection to iterate over the properties individually, but I suspect there may be a better way.

Code example:

' property names are in the string array fieldNames

'baseObjQuery is an ienumerable of baseObj

'derivedObjList is a list of derivedObj[code].....

Is there a simple way to initialize values for the properties in the derived object based upon the values of the common properties in the base object?

View 7 Replies

How To Save Object Hierarchy

May 5, 2010

I have created a set of classes that represent an hierarchySo when I reference like this:

Dim alldeals as deals
alldeals.Deal(5).DealSlot(3).SlotType= "SomeType"
alldeals.Deal(5).DealSlot(4).SlotType= "SomeOtherType"

[code].....

View 3 Replies

Want To Eliminate One Level In Object Hierarchy?

Jun 7, 2010

Not sure how to do thisI have a hierarchy:

Deals at the top
Deals is a collection of Deal
Deal is a collecton of DealSlots

[code]....

View 3 Replies

Charting - Plot Data Using The First Value

Nov 29, 2011

I have been learning and developing a software using VB for my company. I seem to have some issues with Chart function. [Code] Those 2 points will plot 2 datas (xval, finvall) & (xval, finvall2). Here is the thing. When I do the plotting, the starting points are always at (0, 0). That points come from the data point collector editor in the series properties. The question is: How do I plot data using the first value that I have? I don't want to start at (0, 0) but instead using (xval, finvall) & (xval, finvall2). I can't change the data point at run time. Many thanks!

View 6 Replies

Charting With VB 2010 And Exporting To Excel?

Jun 7, 2012

Im doing a project with .Net 4.0, Visual Studio 2010 and Visual Basic .Net.I needed to add a Chart (the new one included by default in .Net 4.0) that represents temperatures evolving with time, so I added the drawing points in the elapsed event of the timer every second.The graph is doing somewhat ok, but I need another functionality, and this is, every time I stop the timer, save the graph in an excel (.XLS or .XLSX) file. As by default the chart provides with a collection of the type "System.Windows.Forms.DataVisualization.Charting.DataPointCollection", I would like to know if there is a way to create an xml and put the info of those collections in the excel file.I have looked around but I didn't find any similar example, last thing im thinking about is to use an iterative way to manually write in the excel file, but maybe its too much time consuming as the iteration will be of several thousands seconds.

View 1 Replies

Sends The Output To Our Charting Program?

Jun 4, 2009

2.0 Framework.Our software does some measurement and then sends the output to our charting program. Right now it is taking 20-30 seconds for the results to print after our chart has sent the data to the printer since the printer is in sleep mode. What we are wanting to do is send a command to wake the printer at the end of our test, before it sends the results to the charting program, so the printer is (hopefully) done "waking up" by the time the chart program auto prints.

I have been looking around and haven't been able to find anything regarding this. The printer we are mainly using is a Brother HL 5250DN. I have contacted Brother but I have yet to hear anything back from them.

View 1 Replies

VS 2010 Charting Control Disappeared?

Oct 19, 2010

The charting control has disappeared from my toolbox in VS2010. I know it was there when I upgraded to 2010 a few weeks ago. Both chart items are checked in the Choose Toolbox Items dialog but it doesn't show up in the toolbox. I'm pretty sure it was under the Data category. I tried resetting the toolbox but that didnt bring it back.

View 1 Replies

C# - Linear Regression/trend Line With Ms Charting

Jan 4, 2011

I have data that are numbers both on x and y and have charted them using mschart 4.0

I need to add a trend line/linear regression to a bunch of points I have. The data on x and y are both numbers (no dates anywhere), for instance (33.4,45.1) would be a point.

In the samples I downloaded from the first link I found a linear regression sample in the code files forecasting.aspx(.cs), and I found this ms documentation

I have added a linear regression line to the chart with the following line (once all other data it setup etc)

Chart1.DataManipulator.FinancialFormula(FinancialFormula.Forecasting, parameters, "Input:Y", "Forecasting:Y,Range:Y,Range:Y2");

The problem with both of these is that they assume dates are used. I went ahead and implemented it anyway, but my regression line starts at around the x value of 20, and will go to an x value of the max x value of one of the points (almost 70) if I give the parameter Period a value of 700. But since it doesn't start at x value 0 I don't trust it is correct.

View 1 Replies

Godaddy Host Not Support Charting In Asp.net - Pro Webmasters?

May 26, 2012

Possible Duplicate: How to find web hosting that meets my requirements?

I was going to use the asp.net charting with Visual Studios 2008 but GoDaddy hosting does not support the charting cause they won't install the component.So what are my options for charting/graphs for data? Looking for free if possible.

View 2 Replies

How To Program The Hierarchy Like This In .Net

Mar 30, 2011

I am a beginner for using VB.NET. I have a problem in which we have several "Program", each "Program" has N "group", and each group has N "unit", shown as follows. i need to link "Program" and the corresponding "group" and "unit" together. First , the properties of lower layer depends on upper layer's properties. Second, If i delete one "Program", the cooresponding "group" and "unit" will be deleted as well.

[Code]...

View 2 Replies

Interface And Graphics :: Translucent Pie Chart Using MS Charting Control

Feb 22, 2010

I'm using the MS Charting control, and can't find the way to create the translucent effect shown in their example piccy[url]...

Notice how the pie chart is translucent. How is this done with the chart control on a winform?

View 2 Replies

Set X-axis Scales For Date/Time Values In .NET Charting?

Mar 3, 2010

I'm importing some data from MySQL into a VB.NET application with .NET charts. At the moment, the chart is plotting points by date, which means that when you zoom in, each major tick mark simply displays the date.It would be better to change these dates to times (hours) when one zooms in.Presumably there's a parameter to do this, but I can't find it.

View 1 Replies

Event Won't Come Through Class Hierarchy

Feb 2, 2010

I'm writing a Windows Forms application in VB.Net 2008, .NET Framework 3.5, and I am trying to handle an event created by a class that get's instantiated several times throughout the program. The thing is the events gets fired in the Functions class, but nothing's happening in the main class.I tried to change the called class by instantiating it in the beginning of the main class, by using 'WithEvents testEvent as MTO_Tool.Functions = New Functions' but that also didn't work.

Code:

' The main class:
Public Class MainScreen
WithEvents testEvent As MTO_tool.Functions
Private Sub test() Handles testEvent.SaveChanges

[code]....

View 1 Replies

Making A Shape Hierarchy?

Apr 10, 2012

I am working through my Visual Basic Book 2010 book and came across this Program example:Create 3 classes that inherit from a base class named Shape. The Shape class has an instance variable that is the name of the shape and also a CalcArea() function that must be overridden by each subclass. You will need to create the following 3 classes and use the formulas provided to calculate the areas.

Square � Area = sideLength * sideLength
Circle � Area = pi * radius * radius (use Math.Pi for the value of pi)
Triangle � Area = � * base * height

Each subclass should have a constructor that you use to set the name and the attributes required to calculate the area with. Each subclass should also override the CalcArea() function that is provided in the base class Shape. They will also need to implement the toString() method that will print out the shape name, any attributes (ex: sideLength), and the area.It also includes the Shape base class. You will need to add the 3 subclasses and add the appropriate code.

View 5 Replies

Control Width Of Custom Labels In System.Web.UI.DataVisualization.Charting?

Jan 20, 2011

I have some code that produces a simple thermometer-like chart using an old Dundas charting component (ver 7).[code]...

View 1 Replies

Getting All The Parent Hierarchy Until Reaching A Certain Type?

Feb 3, 2009

I could put a Textbox in a Panel then that panel is placed in a TabPage, how do I go out going through the hierarchy of the Textbox parent until reaching the TabPage? My purpose for this is if I want to focus on a Textbox then of course I would have to also select the TabPage where it is located, is there an easier way than what I am planning to do?

View 3 Replies

Regular Expression: List Hierarchy?

Jan 6, 2010

I am working on an opening search screen for a program that grabs information on a file for the user. Subfolders are defined by periods so some possible files include

FolderA.SubFolder1.SetupX.txt
FolderB.SubFolder2.SetupY.txt
FolderB.SetupX.txt
FolderA.SubFolder1.SetupZ.txt

When the search button is clicked all of these are populated into a list box currently using the following function's

[Code]...

The problem is that subfolders will continue to be created with unknown names. I'm thinking I need to use some sort of loop that counts the number of periods and then compares the directories using some sort of negative lookahead to group them. Im still unsure how I'll make it so Clicking Setup Y and hitting OK will be able to maintain that I am opening FolderB.Subfolder2.SetupY.txt and not just SetupY.txt

View 4 Replies

Charting Component - Chart Data Using Basic Bars, Pies, Lines, Etc

Feb 24, 2010

I'm only getting started with VB.Net, using VB Express 2008. Using the System.Data.SQLite wrapper, I need to read data off an SQLite database file, and chart data using basic bars, pies, lines, etc. Nothing fancy. Which component would you recommend, either open-source or affordable?

View 1 Replies

Class Hierarchy - Data Design In An RPG Game

Aug 10, 2010

how to organize the classes within my RPG project that I'm making. I've tried to implement a battle system but I am not comfortable with my initial results. This is the basic layout I currently have for my classes. [Code] clsCharacter contains statistics pertaining to one character, including magic available to that character to use. Also includes what weapons that character has equipped. clsTeam contains multiple clsCharacter, as well as a list of items that each clsCharacter in the team can use. clsBattle contains two clsTeams. One team is the player and the other is the computer. Now, this is a wonderful way to organize data. However, I see limitations with this approach. For instance, to pass data from Battle to Character, it has to pass through the team class and vice-versa. Plus, if I use Properties, it transfers data as ByVal instead of ByRef, so I cannot guarantee that I'm editing the original and not a copy of the passed object (IIRC)

In addition, I feel it is just messy code to include methods within the clsCharacter class that invoke this: MyTeam.MyBattle.DoAction(). Plus, the clsCharacter might not even be in the battle at the time - I don't won't to bog down that class featuring code that is exclusive for battling when I also need to be concerned about moving around the map, saving/loading data, etc. So, any suggestions? Right now, I'm burnt out of ideas. One idea I have so far is to include a function for the clsCharacter that exports a list of all possible moves the character could make, and if the character is CPU choose the most optimal one, and if Human than wrap it up in some nifty GUI so they can choose what action to take. But at the same time, how do I use that information within the context of the battle?

View 2 Replies

Show Folders / Files Hierarchy In TreeView

Mar 5, 2008

Any code snippet they could post that will take a specified folder & show the files & subfolders hierarchy in a TreeView?

View 11 Replies

C# - LINQ To SQL To Query Parent And Count Childs In Hierarchy?

Dec 8, 2010

I'd take both C# and VB.NET suggestion.I'm using LINQ to query data. I'm trying to query the parent and count the child tags.Here's my Tags table column:

TagId (int primary)
TagName
ParentId (int Allow NULL referred to TagId column)

Here's some sample data:

[Code]...

View 3 Replies

Entity Framework 4.2 Table Per Hierarchy Group By Discriminator?

Dec 7, 2011

I am working on a project using an EF 4.2 code first model. This model contains a TPH inheritance structure for products. I need to group the polymorphic results of this inheritance model on the discriminator and am running into some issues.

The entity framework does not expose the discriminator to complete this grouping. My first question is can I get direct access to this discriminator? My reading and experience is telling me no, so I came up with this solution that sort of works. It is not performing well and I am not happy with how it will need to be maintained.

My classes look something like this (simplified):

Public MustInherit Class Product
<key()>
Public Property ProductID as integer

[Code].....

Also, this can give me easy access to shared properties (Name) but now I don't have many options to cast these into their real type, maybe a select case around TypeName.

View 1 Replies

Inheritance Hierarchy For Class Quadrilateral / Square And Rectangle

Sep 30, 2009

I have to write an inheritance hierarchy for class Quadrilateral, square and rectangle. Use Quadrilateral as base class of the hierarchy.

So for I had this:
Public MustInherit Class Quadrilateral
Public Function getName() As String
Return "Shape"
End Function

View 1 Replies

Visual Studio 2010 - Creating Hierarchy Of Files?

May 23, 2012

I'm trying to create heirarchy of classes in vb.net. I was able to achieve it in csharp by using the following tags in .csproj

<Compile Include="ClassA.cs">
<DependentUpon>ClassB.cs</DependentUpon>
</Compile>

Below snippet in the solution explorer would be as follows

I need to achieve the same in vb.net.

I'm new to vb.net. Can anybody tell me the alternative of <DependUpon> attribute used in .csproj equivalent in .vbproj. For some reason, this attribute seems to be ignored in the .vbproj even though it is displayed in the visualstudio2010 intellisence.

View 2 Replies

Class Hierarchy - Data Design In A RPG Game Where Classes Overlap?

Aug 19, 2010

This is a followup to the question I asked here:

[URL]

I understand the answer in the post above, which is absolutely amazing, by the way. It's about implementing interfaces with a class. However, what if a class needs to share features with another class?Yes, that class can an Interface. However, let's use this sample definition.

[code]...

Or, in other words:An equippable item can perform acts outside of its typical usage of a shield or weapon. But not all items can act as a sheid or weapon.I mean, I could create a class that implements IWeapon, IShield, IMagic, IUseableItem, etc. But there should be a better way than returning NULL when those interfaces are called.

View 2 Replies

IDE :: IntelliSense Slow When List Filtering Large DataSet Hierarchy

Nov 21, 2007

I just converted my project from VS 2005 to 2008 and started getting really bad lag only when intellisense iterates my dataset objects. The cpu maxes out one of my cores for about 2-3 seconds each time the intellisense list pops up. Is this a new feature of the 2008 ide?

View 19 Replies

VS 2008 DataVisualization - Why Can Access System.Windows.Forms.DataVisualization.Charting.Utilities Within C# But Not VB

Feb 3, 2010

why I can access System.Windows.Forms.DataVisualization.Charting.Utilities within C#, but not VB?

View 3 Replies

Error - LINQ To Entities Does Not Recognize The Method 'System.Object IIf(Boolean, System.Object, System.Object)'

Jul 29, 2011

I am getting following error whenever I want to use IIf function inside entity framework query.

LINQ to Entities does not recognize the method 'System.Object IIf(Boolean, System.Object, System.Object)' method, and this method cannot be translated into a store expression.

View 1 Replies

Method 'System.Object CompareObjectEqual(System.Object, System.Object, Boolean)' Has No Supported Translation To SQL.?

Apr 16, 2010

What do I need to convert?

Dim CEESearchByAppNo = From CEEsearch In dbCEE.tblScanneds _
Where CEEsearch.AppNo = iAppNo

[code].....

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved