Jump to content
Software FX Community

Exporting Questions...


User (Legacy)

Recommended Posts

I am using the CFIE2000 trial version to evaluate the product... 

First, how do I export a file to a specified size? I have :

oChart.ImgHeight = 240

oChart.ImgWidth = 500

oChart.UpdateSizeNow

oChart.Export CHART_BITMAP, "C:\adam\Chart1.bmp"

But this does not work. It's always 191x191!

Second, how do I export to a jpg or gif or png. I am using the cfie2000

component from vb and want to create a chart to be included in a web page.

I don't care about any of hte fancy interaction stuff (right now) and just

want to export a jpg or gif in code. How do I do this??

Here is some code I am playing with right now:

Thanks for any help!!!

Public Function webChartTest() As String

Dim oChart As New ChartFX

Dim numDays As Integer

Dim lcv As Integer

numDays = 30

oChart.RGBBk = RGB(255, 255, 255)

oChart.Gallery = OPENHILOWCLOSE

oChart.Chart3D = False

oChart.Axis(AXIS_Y).Min = 250

oChart.Axis(AXIS_Y).Max = 300

oChart.Axis(AXIS_Y).STEP = 10

oChart.Palette = "Electric Fire"

oChart.Title(CHART_TOPTIT) = "Updated " & Now()

' Open Communications channel

oChart.OpenDataEx COD_VALUES Or COD_COLORS, 4, numDays

Randomize

For lcv = 0 To numDays - 1

oChart.ValueEx(OHLC_OPEN, lcv) = 270 + Int((10 * Rnd) + 1)

oChart.ValueEx(OHLC_HIGH, lcv) = 280 + Int((10 * Rnd) + 1)

oChart.ValueEx(OHLC_LOW, lcv) = 255 + Int((10 * Rnd) + 1)

oChart.ValueEx(OHLC_CLOSE, lcv) = 265 + Int((10 * Rnd) + 1)

Next lcv

' Close the communications channel

oChart.CloseData COD_VALUES Or COD_COLORS

oChart.ImgHeight = 240

oChart.ImgWidth = 500

oChart.UpdateSizeNow

oChart.Export CHART_BITMAP, "C:\adam\Chart1.bmp"

Set oChart = Nothing

End Function

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...