Jump to content
Software FX Community

Defaulting to Bar Charts when Chart1.Gallery = LINES


User (Legacy)

Recommended Posts

The problem is when I have a multiple graph display the gallery is not

LINES. When I have a single graph, the line graph is displayed correctly.

Sometimes the multiple graph display is in 3D as well. Here is how I create

the graph:

Chart1.Chart3D = False

Chart1.TypeMask = &H6880401&

Chart1.Scheme = CHART_CSHATCH

Chart1.MarkerShape = MK_NONE

'Fix the flickering of the screen

Chart1.TypeEx = Chart1.TypeEx OR CTE_MERGEPALETTE

Chart1.Axis(AXIS_X).TickMark = TS_GRID Chart1.Palette = "ChartFX 3.0"

'Calculate the number of days to show

If DateDiff("d", CDate(Session("StartDate")), CDate(Session("EndDate"))) < 1

Then

DateTick = 1

Else

DateTick = Cint(DateDiff("d", CDate(Session("StartDate")),

CDate(Session("EndDate"))))

End If

Chart1.OpenDataEx COD_VALUES, PointCount, COD_UNKNOWN

If CStr(Session("UserGraph")) = "PF" Then

Chart1.Title(CHART_TOPTIT) = "Power Factor"

Else

Chart1.Title(CHART_TOPTIT) = "Generic Graph"

End If

Chart1.Title(CHART_TOPTIT) = "Generic Graph"

Chart1.Axis(AXIS_X).Format = AF_DATE

For nCnt = 0 To PointCount - 1

Results = objBiz.GenericGraph(CLng(Session.SessionID),

CLng(PointList(nCnt)), CDate(Session("StartDate")), CInt(DateTick))

y = CInt(objBiz.ResultPoint("count", 0))

For nCnt2 = 0 To (y - 1)

Flag = 1

If PointCount > 1 Then

Chart1.SerLegBox = True

Chart1.Series(nCnt).Legend = sDesc(nCnt)

Else

Chart1.Title(CHART_TOPTIT) = sDesc(0)

End If

Chart1.Series(nCnt).YValue(nCnt2) = CDbl(objBiz.ResultPoint("value",

CInt(nCnt2)))

If nCnt = 0 Then

Results = objBiz.FormatStr(CStr(objBiz.ResultPoint("timestamp",

CInt(nCnt2))), _ "m/d h:mm")

Chart1.Axis(AXIS_X).Label(nCnt2) =

objBiz.FormatStr(CStr(objBiz.ResultPoint("timestamp", CInt(nCnt2))), "m/d

h:mm")

End If

Next

Next

Chart1.Axis(AXIS_X).LabelAngle = 90

Chart1.Axis(AXIS_Y).Min = objBiz.ResultPoint("min", 0)

Chart1.Axis(AXIS_Y).Max = objBiz.ResultPoint("max", 0)

Chart1.CloseData COD_VALUES

-- Other code here --

Select Case Flag

Case 1

Chart1.Gallery = LINES

Response.Write Chart1.GetHtmlTag(625, 299, "Auto", "Chart1")

--- Other code left out ---

End Select

Even though I set the Chart1.Gallery = LINES and Chart1.Chart3D = False, I'm

still getting a 3D chart (randomly) and a Bar chart only when I select more

than one point for a multi-graph.

If anyone could help, I appreciate it.

Thanks!

David Golus, MCSD, MCDBA

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...