473,395 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

update variable for charting

I just use queryString ("image") to keep generated chart in the middle panel
with top menu and bottom table when user select different chart varibale like
Unit on the dropdownlist button and enter date on the textbox. The top panel
is menu including dropdownlist button, textbox and submit button, the bottom
panel is reference table called gvReference. When page is load, it shows
menu, chart and reference table. Then when user select different chart
variable like Unit and enter Date in the textbox and hit Submit, there are 2
situations, one is if use queryString ("image") condition in the
Button_click sub, it always show the old chart with menu and table (that
means notuse new variable to draw chart), second is if no queryString
("image") condition, it shows only updated chart ( use new selected
vaaibels to draw chart), but lost mean and reference table. So I want to
keep top menu and table in the bottom and let new generated chart in the
middle panel. In general, what I want is when user select varibles and hit
submit, I want use new vabile to drawLineChart and display on the middle
panel without losting top menu and table in the bottom. I spend long time
and still get problem soloved, any suggestion and any new approach. Thanks
so much in advance.

1.CemsChart.aspx page for image part

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="CemsChart.aspx.vb"
Inherits="CemsChart"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

<HEAD>

<title>Cems Charting</title>

<meta http-equiv ="refresh" content= "300" />

</HEAD>

<body >

<form id="Form1" method="post" runat="server">
<asp:Panel ID="Panel1" runat="server" Height="44px" Width="986px">

<asp:Label ID="Label2" runat="server" Text="Select Unit: " Font-Bold="True"
Font-Size="Small"></asp:Label>

<asp:DropDownList ID="dplstUnit" runat="server" Width="141px">

</asp:DropDownList>

<asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Select Date:
"></asp:Label>
<asp:textbox id="tbDate" runat="server" Width="81px"></asp:textbox>
</asp:Panel>

<asp:Panel ID="Panel2" runat="server" Height="506px" Width="1100px">
<asp:Image ID="Image3" runat="server"

Width="1000px" Height="500px" AlternateText="Cems Chart" ImageAlign="Middle"
ImageUrl="CemsChart.aspx?image=1">
</asp:Image>
</asp:Panel>

<asp:Panel ID="Panel3" runat="server" Height="98px" Width="1000px">
Reference Data
<asp:GridView ID="gvReference" runat="server" CaptionAlign="Top"
CellSpacing="1" >
</asp:GridView>
</asp:Panel>

</form>
</body>

</HTML>

---------------------------------------------------------------------------------

2. CemsChart.aspx.vb

Imports System.Drawing

Imports System.Drawing.Text

Imports System.Drawing.Drawing2D

Imports System.Drawing.Imaging

Imports System.Data.SqlClient

Public Class CemsChart Inherits System.Web.UI.Page

Public strDate As String

Public strFilename As String

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

If Not IsPostBack Then

tbDate.Text = Today

'End If

If Not IsPostBack Then

strDate = tbDate.Text

End If 'end postback

'.'*** call menuTable ****

Call PopulateListTable()

strFilename = dplstUnit.SelectedValue

If Request.QueryString("image") = 1 Then 'second postback to call ?

Call DrawLineChart(strDate, strFileName)

End If

End Sub

Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click

strDate = tbDate.Text

'**** call PopulateListTable******************************

Call PopulateListTable()

If Request.QueryString("image") = 1 Then

Call DrawLineChart(strDate, strFilename)

End If

End Sub

Public Sub PopulateListTable() 'pupulate dplstUnit downloadlist and
gvRefeence table

//code here

End Sub

Public Sub DrawLineChart(ByVal title As String, ByVal subTitle As String,
ByVal width As Integer, ByVal height As Integer, ByRef dt As DataTable, ByVal
timeP As Integer, ByRef

target As Stream)

// code here

End sub
Apr 30 '07 #1
0 947

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jerry Sievers | last post by:
Dear Pythonists; I would appreciate a recommendation of a open source package for charting numeric data such as stock market quotes etc. Have such a thing in PHP called JPGraph which is very...
4
by: Brian | last post by:
I want to develop an application that has an oscilliscope . I was wondering if anyone has experience (good or bad) of any commercial charting packages that will provide this sort of functionality....
6
by: DG | last post by:
is there a charting control that comes with visual studio or i'll have to buy one? what do you reccomend? thanx
4
by: Robin | last post by:
What charting is available in asp.net as standard?
2
by: Jesse Aufiero | last post by:
I'm looking for a good third-party charting component with a user-friendly designer. Does anyone know of one? Thanks!
3
by: harris_cohen | last post by:
I am comparing many different charting components for use in my project and am seeking feedback from current users. I have looked at Nevron, Teechart, ComponentArt, SharpGraph and others. Some are...
3
by: Igor | last post by:
Hi all, I'm looking for a tool that can design charts and save chart definitions in a file. I would put those chart definitions in a database and then later load them and render charts (as...
20
by: Joe | last post by:
Is any one charting packing considered to be the "best"? We've used ChartFX but wasn't too happy about the way data had to be populated along with some other issues which slip my mind right now and...
2
by: RobcPettit | last post by:
Hi, can anyone suggest how to go about charting. Id like to add a price graph/ma graph and volume chart. My data streems from the internet every second. Ive looked at components but most are out of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.