Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FoxCharts help needed

herbstgy

Programmer
Jan 30, 2018
66
HU
Hi Guys

help me out please because I'm out of my wits here

I try to create an area graph in FoxCharts about a 24 hours period in 1 minute detail. That would mean 1440 elements in the chart. The table is already built with a single row for every minute of the day. The first field of the row contains the time of day in 'hh:mm format.

the code is like this

Code:
LOCAL loChart
loChart = This.chartOssz


WITH loChart as FoxCharts of FoxCharts.Vcx
    .ChartType=10


    * Then, we need to tell the class that it will receive 3 fields of data
    * Each field will represent one line
    * Later you can try changing the value of the property "ChartType" with values from 1 to 14
    * Be careful because we don't have Charttype #3 available yet :-)
    .ChartsCount = 2


    * Then we tell FoxCharts the name of the cursor that contains the data needed
    .SourceAlias = "posgraph"


    * Next step is to populate the collection object that will receive the information from the cursor
    .Fields(1).FieldValue = "N_0"
    .Fields(1).Legend = "Respcode 0"
    .Fields(1).Color=RGB(0,128,0)
    .Fields(2).FieldValue = "N_1"
    .Fields(2).Legend = "Respcode 1"
    .Fields(2).Color=RGB(0,255,0)
    *     .FieldColor='color'
    *     .FieldLegend='legend'
    .FieldAxis2='ltim'
    .showaxis2tics=.f.
    .marginbottom=15
    .axisLegend2.Alignment= 1
    .axisLegend2.Rotation=315
    .Colortype=1


    * Draw the chart
    .DrawChart()
ENDWITH

everything is fine and dandy I just can't find the parameter which tells to FoxChart NOT to write the X-Axis legend for every minute so the X axis looks like this:

1745671174816.png

anybody can help me with this?
 
Hi

I myself have been using foxcharts to draw simple graphs and haven't explored the full features yet. Sorry for not being able to help but there are lot of features in foxgraph which if used properly will give you the results you want. Have you gone through the help file to find what you are looking for?

Regards
Ravi
 
yup, already spent a half day with it... haven't give it up yet. :)
 
Herbstgy,

Try to set the contents of the field referenced in fieldaxis2 property to an empty value.
 

Part and Inventory Search

Sponsor

Back
Top