Clearing Graph
Posted: Wed Jul 16, 2008 3:43 pm
I am creating several jpg files at one time and looking for the java equivalent to the VB ocx code below
With TChart1
.ClearChart
Here are snippets of my java code
public static void main(String args[])
TeeChart demo = new TeeChart();
TeeChartWrapper teeChartWrapper = new TeeChartWrapper();
String jpgFileName = "TestInitialAllocation.jpg";
teeChartWrapper.createAllocationPieChartGraph(jpgFileName, initAllocation, fund, additionalLegendTitle);
jpgFileName = "TestPointLineFIA.jpg";
teeChartWrapper.createPointLineGraph(jpgFileName, indexLinkedValueSelInc, additionalBenValueInc, indexLinkedValueMinInc, minimumValueInc, pointLineGraphNames);
return;
}
In my TeeChartWrapper.java source file, I have:
protected TChart myChart = new TChart();
public void createAllocationPieChartGraph(String jpgFileName, int[] allocAmounts, String[] legendNames, String additionalLegendTitle) {
and
public void createPointLineGraph(String jpgFileName, int[] line1Values, int[] line2Values, int[] line3Values,int[]line4Values, String[]legendNames) {
If I only execute one of these functions from main - everything is fine - but if I execute 2 - there are leftovers from my first graph.
Thanks
With TChart1
.ClearChart
Here are snippets of my java code
public static void main(String args[])
TeeChart demo = new TeeChart();
TeeChartWrapper teeChartWrapper = new TeeChartWrapper();
String jpgFileName = "TestInitialAllocation.jpg";
teeChartWrapper.createAllocationPieChartGraph(jpgFileName, initAllocation, fund, additionalLegendTitle);
jpgFileName = "TestPointLineFIA.jpg";
teeChartWrapper.createPointLineGraph(jpgFileName, indexLinkedValueSelInc, additionalBenValueInc, indexLinkedValueMinInc, minimumValueInc, pointLineGraphNames);
return;
}
In my TeeChartWrapper.java source file, I have:
protected TChart myChart = new TChart();
public void createAllocationPieChartGraph(String jpgFileName, int[] allocAmounts, String[] legendNames, String additionalLegendTitle) {
and
public void createPointLineGraph(String jpgFileName, int[] line1Values, int[] line2Values, int[] line3Values,int[]line4Values, String[]legendNames) {
If I only execute one of these functions from main - everything is fine - but if I execute 2 - there are leftovers from my first graph.
Thanks