Click here to Skip to main content
15,895,283 members
Home / Discussions / C#
   

C#

 
AnswerRe: VS2010 chart Control Pin
Rutvik Dave6-Oct-10 5:13
professionalRutvik Dave6-Oct-10 5:13 
GeneralRe: VS2010 chart Control Pin
kibromg6-Oct-10 5:26
kibromg6-Oct-10 5:26 
GeneralRe: VS2010 chart Control Pin
Rutvik Dave6-Oct-10 6:03
professionalRutvik Dave6-Oct-10 6:03 
GeneralRe: VS2010 chart Control [modified] Pin
kibromg6-Oct-10 6:17
kibromg6-Oct-10 6:17 
GeneralRe: VS2010 chart Control Pin
Rutvik Dave6-Oct-10 7:59
professionalRutvik Dave6-Oct-10 7:59 
GeneralRe: VS2010 chart Control Pin
kibromg7-Oct-10 3:12
kibromg7-Oct-10 3:12 
GeneralRe: VS2010 chart Control Pin
Rutvik Dave7-Oct-10 4:33
professionalRutvik Dave7-Oct-10 4:33 
GeneralRe: VS2010 chart Control [modified] Pin
kibromg7-Oct-10 6:21
kibromg7-Oct-10 6:21 
Thanks a million you are my hero Dave.Anything will be given for you man. Thanks. Smile | :)

One last question : dr["time"] is coming as Y axis and the others like dr["progress"] are on X axis. How do i reverse it ?so the Dr{time} is X axis.

Here is the Code:--

Dim dt As New DataTable

With dt

.Columns.Add(New DataColumn("Hour", System.Type.GetType("System.String")))
.Columns.Add(New DataColumn("Acheived", System.Type.GetType("System.String")))
.Columns.Add(New DataColumn("Hourly_target", System.Type.GetType("System.String")))
.Columns.Add(New DataColumn("Hourly_targetPer", System.Type.GetType("System.String")))

.PrimaryKey = New DataColumn() {dt.Columns("Hour")}

End With

Chart1.Series.Add("Hourly_target")
Chart1.Series(0).ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Bar
Chart1.Series(0).IsValueShownAsLabel = True
Chart1.Series(0).LabelFormat = "#"
' here you want just target money right ?
Chart1.Series.Add("Acheived")
Chart1.Series(1).ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Bar
Chart1.Series(1).IsValueShownAsLabel = False
' i have changed this
Chart1.Series(0).LabelFormat = "#"
Chart1.Series(0).XValueMember = "Hour"
Chart1.Series(1).YValueMembers = "Hourly_target"



Chart1.Series(0).Points.Clear()
Chart1.Series(1).Points.Clear()


For Each myDataRow As DataRow In dt.Rows

Chart1.Series(0).Points.AddXY(myDataRow("Hour"), myDataRow("Hourly_target"))
Chart1.Series(1).Points.AddXY(myDataRow("Hour"), myDataRow("Acheived"))
Chart1.Series(1).Points(Chart1.Series(1).Points.Count - 1).Label = myDataRow("hourly_targetPer").ToString + "%"


Next



However i get x axis -- Hourly_target and Y axis is Hour. Is there anything i am missing ,It should be the reverse .


sorry i meant to ask changing the color of the barchart not the backcolor.

Thanks Dave



-- Modified Thursday, October 7, 2010 1:36 PM
GeneralRe: VS2010 chart Control Pin
Rutvik Dave7-Oct-10 8:01
professionalRutvik Dave7-Oct-10 8:01 
GeneralRe: VS2010 chart Control Pin
kibromg12-Oct-10 6:32
kibromg12-Oct-10 6:32 
GeneralRe: VS2010 chart Control Pin
Rutvik Dave13-Oct-10 9:08
professionalRutvik Dave13-Oct-10 9:08 
Questioncalling vs2005 tool from out side Pin
prasadbuddhika5-Oct-10 23:26
prasadbuddhika5-Oct-10 23:26 
AnswerAttempt to bump post - please don't reply on this thread, reply to the original thread instead. Pin
Pete O'Hanlon5-Oct-10 23:45
mvePete O'Hanlon5-Oct-10 23:45 
QuestionExcel upload Pin
Ramkithepower5-Oct-10 22:39
Ramkithepower5-Oct-10 22:39 
Question.net 2.0 Custom Configuration Sections Pin
AndieDu5-Oct-10 20:51
AndieDu5-Oct-10 20:51 
AnswerRe: .net 2.0 Custom Configuration Sections Pin
Keith Barrow6-Oct-10 10:24
professionalKeith Barrow6-Oct-10 10:24 
GeneralRe: .net 2.0 Custom Configuration Sections Pin
AndieDu6-Oct-10 13:36
AndieDu6-Oct-10 13:36 
GeneralRe: .net 2.0 Custom Configuration Sections Pin
Keith Barrow6-Oct-10 21:11
professionalKeith Barrow6-Oct-10 21:11 
Questionmerging two word file [modified] Pin
annie_bel5-Oct-10 18:44
annie_bel5-Oct-10 18:44 
AnswerRe: merging two word file Pin
rah_sin5-Oct-10 19:22
professionalrah_sin5-Oct-10 19:22 
GeneralRe: merging two word file Pin
Thomas Krojer5-Oct-10 20:56
Thomas Krojer5-Oct-10 20:56 
GeneralRe: merging two word file Pin
Dave Kreskowiak6-Oct-10 2:32
mveDave Kreskowiak6-Oct-10 2:32 
AnswerRe: merging two word file Pin
Blue_Boy5-Oct-10 21:30
Blue_Boy5-Oct-10 21:30 
GeneralRe: merging two word file Pin
Luc Pattyn6-Oct-10 4:50
sitebuilderLuc Pattyn6-Oct-10 4:50 
AnswerRe: merging two word file Pin
Pete O'Hanlon5-Oct-10 23:09
mvePete O'Hanlon5-Oct-10 23:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.