Jump to content
Software FX Community

X-axis labels


User (Legacy)
 Share

Recommended Posts

I am using ChartFXIE 3.5

I get my data via an SQL query. Text, and 3 numeric values (series).

Data retreival verifed with Response.write.

All plot fine but the x-axis only displays the consecutive red numbers.

My understaning was that the text results from an SQL would automatically

display as the x-label.

Advice? Some code follows. Do I have some conflicting settings or maybe

missing critical one??

PS I am pretty sure that the plots were working correctly prior to some

platform changes last year.

'Get recordset of constituents that have values

Set rstPlots = conPlots.Execute(strSQL)

' Create the chart

Set objCharts = Server.CreateObject("ChartFX.WebServer")

objCharts.MarkerSize = 2

objCharts.toolbar = true

objCharts.CustomTool = objCharts.CustomTool And (CST_EXPORT + CST_PRINT +

CST_SPACE1 + CST_GALLERY + CST_SPACE2 + CST_3D + CST_ZOOM + CST_SPACE3 +

CST_LEGEND + CST_SERLEGEND+ CST_SPACE4 + CST_OPTIONS)

objCharts.Chart3D = False 'show chart as 2D

objCharts.ChartType = LINES 'show line chart

objCharts.Type = objCharts.Type or CT_COLORLINE

objCharts.Style = objCharts.Style OR CS_SCROLLABLE

objCharts.RigClk CHART_NONECLK, 0

objCharts.Grid = CHART_VERTGRID 'show vertical grid lines

objCharts.Title(CHART_TOPTIT) = "CONSTITUENT CONCENTRATIONS FOR WELL " &

strUserChoicePlot

objCharts.TopFont.Name = "Verdana"

objCharts.TopFont.Size = 12

objCharts.TopFont.Bold = True

objCharts.Title(CHART_LEFTTIT) = "Units are ug/L"

objCharts.LeftFont.Name = "Verdana"

objCharts.LeftFont.Size = 11

objCharts.Title(CHART_BOTTOMTIT) = "Not detected constituents are plotted

as 0 ug/L"

objCharts.BottomFont.Name = "Verdana"

objCharts.BottomFont.Size = 10

objCharts.RgbBk = RGB(192,192,192)

objCharts.RGB2DBk = RGB(255,255,255)

objCharts.LegendFont.Name = "Verdana"

objCharts.LegendFont.Size = 7

objCharts.DecimalsNum(CD_YLEG) = 0

objCharts.BorderStyle = 1

objCharts.Type = objCharts.Type OR CT_SERLEGEND '+ CT_LEGEND

objCharts.ToolPos(CTOOL_SERLEGEND) = CTP_FLOAT

'default value for chart type

objCharts.AxisType(0) = CFXFMT_NUMBER

objCharts.FixedGap = 20

objCharts.LegStyle = objCharts.LegStyle OR CL_VERTXLEG Or CL_SINGLELINE Or

CL_NOTCLIPPED

'Modify the bottom gap

objCharts.BottomGap = 120

objCharts.Adm(CSA_YLEGGAP) = 10

objCharts.Adm(CSA_MIN) = 0

'Set Min/Max range for y-axis

objCharts.Adm(CSA_MIN) = 0

'Assign the contents of the ResultSet to the Chart

objCharts.AdoResultset rstPlots

Response.Write(objCharts.GetHtmlTag("100%","100%"))

'Destroy objects

rstPlotCounts.Close

Set rstPlotCounts = Nothing

rstPlots.Close

Set rstPlots = Nothing

Set conPlots = Nothing

Set objCharts = Nothing

Link to comment
Share on other sites

That code did not work for me but I used some other things to display the

values of the x axis that the chart was seeing (just sequential numbers). I

also verified my SQL and the values of "Quarter" that are in the record set

and that should be the x labels. (second page of attached pdf file). Am I

possibly using the wrong kind of plot?

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:auwBJxzaDHA.1340@WEBSERVER1...

> I suspect the labels are just too big to display.

>

> Please add the following to your code:

>

> objCharts.DataEditor = true

>

> Then check the output. Are the headers of the columns big strings ? can

you

> attach a screenshot of this chart (with the DataEditor in it).

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...