Also there are different variations of ComAdd when it comes to creating the points depending upon the style your using. However if you wanted a pie chart you'd also need to create a cComChartDiagramPie inplace of the cComChartDiagram2D. Which I think is "CXTPPointSeriesStyle" but don't quote me )
#Codejock print preview series
Get ComAdd of (phoSeriesPointCollection(Self)) "Wk4" 12 to vPointĮnd_ObjectIf you wanted to change the chart type from a bar chart to say a point chart you would need to set the Series style to be the point style rather than the bar chart style on the line "Get ComCreateElement". Get ComAdd of (phoSeriesPointCollection(Self)) "Wk3" 12 to vPoint Get ComAdd of (phoSeriesPointCollection(Self)) "Wk2" 10 to vPoint You manage the contents inside the frame. Windows manages most of the users interaction with the frame window: moving and resizing the window, closing it, and minimizing and maximizing it. Get Create (RefClass(cComChartSeriesPoint)) to hoPoint A document frame window can be a single document interface (SDI) frame window or a multiple document interface (MDI) child window. Get ComAdd of (phoSeriesPointCollection(Self)) "Wk1" 2 to vPoint Set pvComObject of (phoDiagram2D(Self)) to vDiagram
#Codejock print preview code
the following code is only needed if you intend to set properties of the diagram2d Set pvComObject of (phoSeriesPointCollection(Self)) to vPoints Get ComPoints of (phoChartSeries(Self)) to vPoints Set pvComObject of (phoBarSeriesStyle(Self)) to vStyle Set pvComObject of (PhoChartDiagram(Self)) to vDiagram Get ComItem of (phoChartDiagramCollection(Self)) 0 to vDiagram the following code is only needed if you intend to set properties of the diagram and style Set ComStyle of (phoChartSeries(Self)) to vStyle // the setting of comstyle will also add a diagram to the diagram collection Get ComCreateElement "CXTPChartBarSeriesStyle" to vStyle Set pvComObject of (phoChartSeries(Self)) to vSeries Get ComAdd of (phoChartSeriesCollection(Self)) "" to vSeries Set pvComObject of (phoChartSeriesCollection(Self)) to (ComSeries(PhoChartContent(Self))) Set pvComObject of (phoChartDiagramCollection(Self)) to (ComDiagrams(PhoChartContent(Self))) Binding of Diagram and series collections Set pvComObject of (PhoChartContent(Self)) to (ComContent(Self)) Property Handle phoDiagram2D (Create(PhoChartDiagram(Self),RefClass(cComChartDi agram2D))) Property Handle PhoChartDiagram (Create(Self,RefClass(cComChartDiagram))) Property Handle phoSeriesPointCollection (Create(PhoChartSeries(Self),RefClass(cComChartSer iesPointCollection))) Property Handle phoBarSeriesStyle (Create(PhoChartSeries(Self),RefClass(cComChartBar SeriesStyle))) Calendar The ExCalendar library contains two components, simple version and drop-down version that allow. Property Handle PhoChartSeries (Create(Self,RefClass(cComChartSeries))) VBA VB6 VB7/COM C++ C++ Builder C/COM JScript VBScript X++ VFP VFP 9 dBASE Xbasic Delphi 8 Delphi Visual Objects PowerBuilder Visual DataFlex Xbase++. Property Handle phoChartSeriesCollection (Create(Self,RefClass(cComChartSeriesCollection))) Property Handle phoChartDiagramCollection (Create(Self,RefClass(cComChartDiagramCollection)) ) Property Handle PhoChartContent (Create(Self,RefClass(cComChartContent))) Here's a very basic example of a bar chart using the chart control