473,465 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Two parameters into graph

24 New Member
Next metod gets data for graph:

Expand|Select|Wrap|Line Numbers
  1. private void ReadTemperatureFromRS232()
  2.     {
  3.         if(readReservated ==0){
  4.         timeReservated =1;
  5.         Data = ReadParamFromPIC('R');
  6.         timeReservated=0;
  7.         buckupData = Data ;
  8.         }
  9.         else {
  10.             Data = buckupData;
  11.         }
  12.         float Dat = Float.parseFloat(Data);
  13.         tseries.addOrUpdate(new Second(new Date()),Dat);
  14.  
  15. private TimeSeriesCollection createDataset()
  16.     {
  17.         TimeSeries ts = new TimeSeries("Actual Temperature", Second.class);
  18.         TimeSeriesCollection dataset = new TimeSeriesCollection();
  19.         dataset.addSeries(ts);     
  20.         ts.setMaximumItemAge(30*60);
  21.         return dataset;
  22.  
  23.     }
  24.  
And in this way the graph is drowen:

Code:
Expand|Select|Wrap|Line Numbers
  1.  private void DrawGraph()
  2.     {
  3.         dataset = createDataset();
  4.         TCh = new TChartWrite();
  5.         MainChrt = TCh.createChart(dataset);
  6.         MainChartPnl = new ChartPanel(MainChrt);
  7.         MainChartPnl.setBounds(0,0,640,480);
  8.         jPanel1.add(MainChartPnl);
  9.         jPanel1.setVisible( true );
  10.         MainChartPnl.validate();
  11.         tseries = dataset.getSeries(0);
  12.     }

}


This code works good.
But i would like to draw another parameter in the same graph. Now i have "Actual" temperature, but i also need "Wished" temperature.
I can use first metod (ReadTemperatureFromRS232()) to get second parameter by line in code: Data2 = ReadParamFromPIC('W');
But then have to integrate it in dataset(tseris). Here is the point where i'm out.

What is the way to reselve this problem?
Mar 2 '07 #1
0 1137

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Lilith | last post by:
Is there a python module somewhere (been searching today, no luck) which has efficiently coded various graph-handling routines, such as finding the shortest path through a graph, or the set of all...
2
by: zipher | last post by:
After searching through comp.lang.python and the web regarding metaclasses, I could not find an example for customing classes using metaclass parameters. I want to be able to create a class at...
1
by: zlatko | last post by:
How to pass parameters to MS Graph (row source is a stored procedure with parameters) placed in Access Project form ? The problem is that there is no Input Parameters property on the graph...
0
by: hf | last post by:
Does anybody know how to pass parameters to the stored procedure (or in-line function) that is used as row source for MS Graph in a form of Access Project ? The problem is that there is no Input...
2
by: sriniwas | last post by:
Hi Frnd's, m using prefuse visulation,it's have one display class and this class have one saveImage(outPutStream, String jpg,double size);. now graph is converting ia jpg image properly.now my...
4
by: Man4ish | last post by:
namespace ve/////////////////ve.h { struct VertexProperties { std::size_t index; boost::default_color_type color; }; }...
2
by: Man4ish | last post by:
I have created Graph object without vertex and edge property.It is working fine. #include <boost/config.hpp> #include <iostream> #include <vector> #include <string> #include...
24
by: =?Utf-8?B?U3dhcHB5?= | last post by:
Can anyone suggest me to pass more parameters other than two parameter for events like the following? Event: Onbutton_click(object sender, EventArgs e)" Event handler: button.Click += new...
0
by: eureka2050 | last post by:
Hi all, I am creating a radar chart containing 2 plots using jpgraph. My code is as follows:- include ("./jpgraph/src/jpgraph.php"); include ("./jpgraph/src/jpgraph_radar.php"); //...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.