constants HistogramCumulativeOriginalColorBarsEnum
The HistogramCumulativeOriginalColorBarsEnum type indicates whether the color for the bars being represented in the histogram is changed. The Bar.HistogramCumulativeOriginalColorBars property indicates whether the bar's color is changed while representing them in the histogram.

 NameValueDescription 
   exShowCumulativeColor-1 The color for bar is not changed, but its reflection in the histogram shows the corresponding cumulative color.

 

 
   exChangeColor0 The color for bar and its reflection in the histogram is showing the corresponding cumulative color. 

 
   exKeepOriginalColor1 The color for bar and its reflection in the histogram is not changed.

 
VBA Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
With G2antt1
	.BeginUpdate 
	.SingleSel = False
	With .Chart
		.LevelCount = 2
		.AllowLinkBars = False
		.DrawGridLines = -1
		.FirstVisibleDate = #12/29/2000#
		.HistogramVisible = True
		.HistogramHeight = 72
		.PaneWidth(0) = 64
		.HistogramView = 1298
		With .Bars.Item("Task")
			.HistogramType = 256
			.HistogramItems = 6
			.HistogramPattern = .Pattern
			.HistogramCumulativeOriginalColorBars = 1
		End With
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Project")
		.ItemBold(h) = True
		.SelectableItem(h) = False
		h1 = .InsertItem(h,0,"Item 1")
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#
		h1 = .InsertItem(h,0,"Item 2")
		.AddBar h1,"Task",#1/3/2001#,#1/5/2001#
		h1 = .InsertItem(h,0,"Item 3")
		.AddBar h1,"Task",#1/4/2001#,#1/6/2001#
		.AddBar h1,"Task",#1/1/2001#,#1/3/2001#,"green"
		.ItemBar(h1,"green",33) = 65280
		.AddBar h1,"Task",#1/8/2001#,#1/10/2001#,"red"
		.ItemBar(h1,"red",33) = 255
		.ExpandItem(h) = True
		.SelectAll 
	End With
	.EndUpdate 
End With
VB6 Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
With G2antt1
	.BeginUpdate 
	.SingleSel = False
	With .Chart
		.LevelCount = 2
		.AllowLinkBars = False
		.DrawGridLines = exAllLines
		.FirstVisibleDate = #12/29/2000#
		.HistogramVisible = True
		.HistogramHeight = 72
		.PaneWidth(0) = 64
		.HistogramView = HistogramViewEnum.exHistogramSelectedItems Or HistogramViewEnum.exHistogramUnlockedItems Or HistogramViewEnum.exHistogramLeafItems Or HistogramViewEnum.exHistogramNoGrouping
		With .Bars.Item("Task")
			.HistogramType = exHistCumulative
			.HistogramItems = 6
			.HistogramPattern = .Pattern
			.HistogramCumulativeOriginalColorBars = exKeepOriginalColor
		End With
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Project")
		.ItemBold(h) = True
		.SelectableItem(h) = False
		h1 = .InsertItem(h,0,"Item 1")
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#
		h1 = .InsertItem(h,0,"Item 2")
		.AddBar h1,"Task",#1/3/2001#,#1/5/2001#
		h1 = .InsertItem(h,0,"Item 3")
		.AddBar h1,"Task",#1/4/2001#,#1/6/2001#
		.AddBar h1,"Task",#1/1/2001#,#1/3/2001#,"green"
		.ItemBar(h1,"green",exBarColor) = 65280
		.AddBar h1,"Task",#1/8/2001#,#1/10/2001#,"red"
		.ItemBar(h1,"red",exBarColor) = 255
		.ExpandItem(h) = True
		.SelectAll 
	End With
	.EndUpdate 
End With
VB.NET Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
Dim h,h1
With Exg2antt1
	.BeginUpdate()
	.SingleSel = False
	With .Chart
		.LevelCount = 2
		.AllowLinkBars = False
		.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines
		.FirstVisibleDate = #12/29/2000#
		.HistogramVisible = True
		.HistogramHeight = 72
		.set_PaneWidth(False,64)
		.HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping
		With .Bars.Item("Task")
			.HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistCumulative
			.HistogramItems = 6
			.HistogramPattern = .Pattern
			.HistogramCumulativeOriginalColorBars = exontrol.EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor
		End With
	End With
	.Columns.Add("Column")
	With .Items
		h = .AddItem("Project")
		.set_ItemBold(h,True)
		.set_SelectableItem(h,False)
		h1 = .InsertItem(h,0,"Item 1")
		.AddBar(h1,"Task",#1/2/2001#,#1/4/2001#)
		h1 = .InsertItem(h,0,"Item 2")
		.AddBar(h1,"Task",#1/3/2001#,#1/5/2001#)
		h1 = .InsertItem(h,0,"Item 3")
		.AddBar(h1,"Task",#1/4/2001#,#1/6/2001#)
		.AddBar(h1,"Task",#1/1/2001#,#1/3/2001#,"green")
		.set_ItemBar(h1,"green",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280)
		.AddBar(h1,"Task",#1/8/2001#,#1/10/2001#,"red")
		.set_ItemBar(h1,"red",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255)
		.set_ExpandItem(h,True)
		.SelectAll()
	End With
	.EndUpdate()
End With
VB.NET for /COM Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
Dim h,h1
With AxG2antt1
	.BeginUpdate()
	.SingleSel = False
	With .Chart
		.LevelCount = 2
		.AllowLinkBars = False
		.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines
		.FirstVisibleDate = #12/29/2000#
		.HistogramVisible = True
		.HistogramHeight = 72
		.PaneWidth(False) = 64
		.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems Or EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping
		With .Bars.Item("Task")
			.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistCumulative
			.HistogramItems = 6
			.HistogramPattern = .Pattern
			.HistogramCumulativeOriginalColorBars = EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor
		End With
	End With
	.Columns.Add("Column")
	With .Items
		h = .AddItem("Project")
		.ItemBold(h) = True
		.SelectableItem(h) = False
		h1 = .InsertItem(h,0,"Item 1")
		.AddBar(h1,"Task",#1/2/2001#,#1/4/2001#)
		h1 = .InsertItem(h,0,"Item 2")
		.AddBar(h1,"Task",#1/3/2001#,#1/5/2001#)
		h1 = .InsertItem(h,0,"Item 3")
		.AddBar(h1,"Task",#1/4/2001#,#1/6/2001#)
		.AddBar(h1,"Task",#1/1/2001#,#1/3/2001#,"green")
		.ItemBar(h1,"green",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 65280
		.AddBar(h1,"Task",#1/8/2001#,#1/10/2001#,"red")
		.ItemBar(h1,"red",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor) = 255
		.ExpandItem(h) = True
		.SelectAll()
	End With
	.EndUpdate()
End With
C++ Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutFirstVisibleDate("12/29/2000");
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(72);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramSelectedItems | EXG2ANTTLib::exHistogramUnlockedItems | EXG2ANTTLib::exHistogramLeafItems | EXG2ANTTLib::exHistogramNoGrouping);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistCumulative);
		var_Bar->PutHistogramItems(6);
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramCumulativeOriginalColorBars(EXG2ANTTLib::exKeepOriginalColor);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	long h1 = var_Items->InsertItem(h,long(0),"Item 1");
	var_Items->AddBar(h1,"Task","1/2/2001","1/4/2001",vtMissing,vtMissing);
	h1 = var_Items->InsertItem(h,long(0),"Item 2");
	var_Items->AddBar(h1,"Task","1/3/2001","1/5/2001",vtMissing,vtMissing);
	h1 = var_Items->InsertItem(h,long(0),"Item 3");
	var_Items->AddBar(h1,"Task","1/4/2001","1/6/2001",vtMissing,vtMissing);
	var_Items->AddBar(h1,"Task","1/1/2001","1/3/2001","green",vtMissing);
	var_Items->PutItemBar(h1,"green",EXG2ANTTLib::exBarColor,long(65280));
	var_Items->AddBar(h1,"Task","1/8/2001","1/10/2001","red",vtMissing);
	var_Items->PutItemBar(h1,"red",EXG2ANTTLib::exBarColor,long(255));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->SelectAll();
spG2antt1->EndUpdate();
C++ Builder Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
G2antt1->BeginUpdate();
G2antt1->SingleSel = false;
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->LevelCount = 2;
	var_Chart->AllowLinkBars = false;
	var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,29).operator double()));
	var_Chart->HistogramVisible = true;
	var_Chart->HistogramHeight = 72;
	var_Chart->set_PaneWidth(false,64);
	var_Chart->HistogramView = Exg2anttlib_tlb::HistogramViewEnum::exHistogramSelectedItems | Exg2anttlib_tlb::HistogramViewEnum::exHistogramUnlockedItems | Exg2anttlib_tlb::HistogramViewEnum::exHistogramLeafItems | Exg2anttlib_tlb::HistogramViewEnum::exHistogramNoGrouping;
	Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->HistogramType = Exg2anttlib_tlb::HistogramTypeEnum::exHistCumulative;
		var_Bar->HistogramItems = 6;
		var_Bar->HistogramPattern = var_Bar->Pattern;
		var_Bar->HistogramCumulativeOriginalColorBars = Exg2anttlib_tlb::HistogramCumulativeOriginalColorBarsEnum::exKeepOriginalColor;
G2antt1->Columns->Add(L"Column");
Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items;
	long h = var_Items->AddItem(TVariant("Project"));
	var_Items->set_ItemBold(h,true);
	var_Items->set_SelectableItem(h,false);
	long h1 = var_Items->InsertItem(h,TVariant(0),TVariant("Item 1"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TNoParam(),TNoParam());
	h1 = var_Items->InsertItem(h,TVariant(0),TVariant("Item 2"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TNoParam(),TNoParam());
	h1 = var_Items->InsertItem(h,TVariant(0),TVariant("Item 3"));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam());
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,3).operator double()),TVariant("green"),TNoParam());
	var_Items->set_ItemBar(h1,TVariant("green"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(65280));
	var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("red"),TNoParam());
	var_Items->set_ItemBar(h1,TVariant("red"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255));
	var_Items->set_ExpandItem(h,true);
	var_Items->SelectAll();
G2antt1->EndUpdate();
C# Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
exg2antt1.BeginUpdate();
exg2antt1.SingleSel = false;
exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart;
	var_Chart.LevelCount = 2;
	var_Chart.AllowLinkBars = false;
	var_Chart.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines;
	var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000");
	var_Chart.HistogramVisible = true;
	var_Chart.HistogramHeight = 72;
	var_Chart.set_PaneWidth(false,64);
	var_Chart.HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems | exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems | exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems | exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping;
	exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"];
		var_Bar.HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistCumulative;
		var_Bar.HistogramItems = 6;
		var_Bar.HistogramPattern = var_Bar.Pattern;
		var_Bar.HistogramCumulativeOriginalColorBars = exontrol.EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor;
exg2antt1.Columns.Add("Column");
exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items;
	int h = var_Items.AddItem("Project");
	var_Items.set_ItemBold(h,true);
	var_Items.set_SelectableItem(h,false);
	int h1 = var_Items.InsertItem(h,0,"Item 1");
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001"),Convert.ToDateTime("1/4/2001"),null,null);
	h1 = var_Items.InsertItem(h,0,"Item 2");
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/3/2001"),Convert.ToDateTime("1/5/2001"),null,null);
	h1 = var_Items.InsertItem(h,0,"Item 3");
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/4/2001"),Convert.ToDateTime("1/6/2001"),null,null);
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/1/2001"),Convert.ToDateTime("1/3/2001"),"green",null);
	var_Items.set_ItemBar(h1,"green",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280);
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/8/2001"),Convert.ToDateTime("1/10/2001"),"red",null);
	var_Items.set_ItemBar(h1,"red",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255);
	var_Items.set_ExpandItem(h,true);
	var_Items.SelectAll();
exg2antt1.EndUpdate();
JavaScript Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
<OBJECT classid="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	G2antt1.BeginUpdate()

	G2antt1.SingleSel = false

	var var_Chart = G2antt1.Chart

		var_Chart.LevelCount = 2

		var_Chart.AllowLinkBars = false

		var_Chart.DrawGridLines = -1

		var_Chart.FirstVisibleDate = "12/29/2000"

		var_Chart.HistogramVisible = true

		var_Chart.HistogramHeight = 72

		var_Chart.PaneWidth(0) = 64

		var_Chart.HistogramView = 1298

		var var_Bar = var_Chart.Bars.Item("Task")

			var_Bar.HistogramType = 256

			var_Bar.HistogramItems = 6

			var_Bar.HistogramPattern = var_Bar.Pattern

			var_Bar.HistogramCumulativeOriginalColorBars = 1

	G2antt1.Columns.Add("Column")

	var var_Items = G2antt1.Items

		var h = var_Items.AddItem("Project")

		var_Items.ItemBold(h) = true

		var_Items.SelectableItem(h) = false

		var h1 = var_Items.InsertItem(h,0,"Item 1")

		var_Items.AddBar(h1,"Task","1/2/2001","1/4/2001",null,null)

		h1 = var_Items.InsertItem(h,0,"Item 2")

		var_Items.AddBar(h1,"Task","1/3/2001","1/5/2001",null,null)

		h1 = var_Items.InsertItem(h,0,"Item 3")

		var_Items.AddBar(h1,"Task","1/4/2001","1/6/2001",null,null)

		var_Items.AddBar(h1,"Task","1/1/2001","1/3/2001","green",null)

		var_Items.ItemBar(h1,"green",33) = 65280

		var_Items.AddBar(h1,"Task","1/8/2001","1/10/2001","red",null)

		var_Items.ItemBar(h1,"red",33) = 255

		var_Items.ExpandItem(h) = true

		var_Items.SelectAll()

	G2antt1.EndUpdate()

</SCRIPT>
C# for /COM Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
axG2antt1.BeginUpdate();
axG2antt1.SingleSel = false;
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart;
	var_Chart.LevelCount = 2;
	var_Chart.AllowLinkBars = false;
	var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines;
	var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000");
	var_Chart.HistogramVisible = true;
	var_Chart.HistogramHeight = 72;
	var_Chart.set_PaneWidth(false,64);
	var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems | EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems | EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems | EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping;
	EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"];
		var_Bar.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistCumulative;
		var_Bar.HistogramItems = 6;
		var_Bar.HistogramPattern = var_Bar.Pattern;
		var_Bar.HistogramCumulativeOriginalColorBars = EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor;
axG2antt1.Columns.Add("Column");
EXG2ANTTLib.Items var_Items = axG2antt1.Items;
	int h = var_Items.AddItem("Project");
	var_Items.set_ItemBold(h,true);
	var_Items.set_SelectableItem(h,false);
	int h1 = var_Items.InsertItem(h,0,"Item 1");
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001"),Convert.ToDateTime("1/4/2001"),null,null);
	h1 = var_Items.InsertItem(h,0,"Item 2");
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/3/2001"),Convert.ToDateTime("1/5/2001"),null,null);
	h1 = var_Items.InsertItem(h,0,"Item 3");
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/4/2001"),Convert.ToDateTime("1/6/2001"),null,null);
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/1/2001"),Convert.ToDateTime("1/3/2001"),"green",null);
	var_Items.set_ItemBar(h1,"green",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280);
	var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/8/2001"),Convert.ToDateTime("1/10/2001"),"red",null);
	var_Items.set_ItemBar(h1,"red",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255);
	var_Items.set_ExpandItem(h,true);
	var_Items.SelectAll();
axG2antt1.EndUpdate();
X++ (Dynamics Ax 2009) Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
public void init()
{
	COM com_Bar,com_Chart,com_Items

	anytype var_Bar,var_Chart,var_Items

	int h,h1




	super()


	exg2antt1.BeginUpdate()

	exg2antt1.SingleSel(false)

	var_Chart = exg2antt1.Chart()
	 com_Chart = var_Chart

		com_Chart.LevelCount(2)

		com_Chart.AllowLinkBars(false)

		com_Chart.DrawGridLines(-1/*exAllLines*/)

		com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213)))

		com_Chart.HistogramVisible(true)

		com_Chart.HistogramHeight(72)

	/*should be called during the form's activate method*/ 	com_Chart.PaneWidth(0,64);
		com_Chart.HistogramView(1298/*exHistogramSelectedItems | exHistogramUnlockedItems | exHistogramLeafItems | exHistogramNoGrouping*/)

		var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task")
	 com_Bar = var_Bar

			com_Bar.HistogramType(256/*exHistCumulative*/)

			com_Bar.HistogramItems(6)

			com_Bar.HistogramPattern(com_Bar.Pattern())

			com_Bar.HistogramCumulativeOriginalColorBars(1/*exKeepOriginalColor*/)

	exg2antt1.Columns().Add("Column")

	var_Items = exg2antt1.Items()
	 com_Items = var_Items

		h = com_Items.AddItem("Project")

		com_Items.ItemBold(h,true)

		com_Items.SelectableItem(h,false)

		h1 = com_Items.InsertItem(h,COMVariant::createFromInt(0),"Item 1")

		com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)))

		h1 = com_Items.InsertItem(h,COMVariant::createFromInt(0),"Item 2")

		com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)))

		h1 = com_Items.InsertItem(h,COMVariant::createFromInt(0),"Item 3")

		com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)))

		com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/3/2001",213)),"green")

		com_Items.ItemBar(h1,"green",33/*exBarColor*/,COMVariant::createFromInt(65280))

		com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"red")

		com_Items.ItemBar(h1,"red",33/*exBarColor*/,COMVariant::createFromInt(255))

		com_Items.ExpandItem(h,true)

		com_Items.SelectAll()

	exg2antt1.EndUpdate()

}

/*
public void activate(boolean _active)
{
	super(_active)


	exg2antt1.Chart().PaneWidth(0,64)

}
*/
VFP Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
with thisform.G2antt1
	.BeginUpdate
	.SingleSel = .F.
	with .Chart
		.LevelCount = 2
		.AllowLinkBars = .F.
		.DrawGridLines = -1
		.FirstVisibleDate = {^2000-12-29}
		.HistogramVisible = .T.
		.HistogramHeight = 72
		.PaneWidth(0) = 64
		.HistogramView = 1298
		with .Bars.Item("Task")
			.HistogramType = 256
			.HistogramItems = 6
			.HistogramPattern = .Pattern
			.HistogramCumulativeOriginalColorBars = 1
		endwith
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Project")
		.ItemBold(h) = .T.
		.SelectableItem(h) = .F.
		h1 = .InsertItem(h,0,"Item 1")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4})
		h1 = .InsertItem(h,0,"Item 2")
		.AddBar(h1,"Task",{^2001-1-3},{^2001-1-5})
		h1 = .InsertItem(h,0,"Item 3")
		.AddBar(h1,"Task",{^2001-1-4},{^2001-1-6})
		.AddBar(h1,"Task",{^2001-1-1},{^2001-1-3},"green")
		.ItemBar(h1,"green",33) = 65280
		.AddBar(h1,"Task",{^2001-1-8},{^2001-1-10},"red")
		.ItemBar(h1,"red",33) = 255
		.ExpandItem(h) = .T.
		.SelectAll
	endwith
	.EndUpdate
endwith
dBASE Plus Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
local h,h1,oG2antt,var_Bar,var_Chart,var_Items

oG2antt = form.Activex1.nativeObject
oG2antt.BeginUpdate()
oG2antt.SingleSel = false
var_Chart = oG2antt.Chart
	var_Chart.LevelCount = 2
	var_Chart.AllowLinkBars = false
	var_Chart.DrawGridLines = -1
	var_Chart.FirstVisibleDate = "12/29/2000"
	var_Chart.HistogramVisible = true
	var_Chart.HistogramHeight = 72
	// var_Chart.PaneWidth(false) = 64
	with (oG2antt)
		TemplateDef = [Dim var_Chart]
		TemplateDef = var_Chart
		Template = [var_Chart.PaneWidth(false) = 64]
	endwith
	var_Chart.HistogramView = 1298 /*exHistogramSelectedItems | exHistogramUnlockedItems | exHistogramLeafItems | exHistogramNoGrouping*/
	var_Bar = var_Chart.Bars.Item("Task")
		var_Bar.HistogramType = 256
		var_Bar.HistogramItems = 6
		var_Bar.HistogramPattern = var_Bar.Pattern
		var_Bar.HistogramCumulativeOriginalColorBars = 1
oG2antt.Columns.Add("Column")
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	// var_Items.ItemBold(h) = true
	with (oG2antt)
		TemplateDef = [Dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemBold(h) = true]
	endwith
	// var_Items.SelectableItem(h) = false
	with (oG2antt)
		TemplateDef = [Dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SelectableItem(h) = false]
	endwith
	h1 = var_Items.InsertItem(h,0,"Item 1")
	var_Items.AddBar(h1,"Task","01/02/2001","01/04/2001")
	h1 = var_Items.InsertItem(h,0,"Item 2")
	var_Items.AddBar(h1,"Task","01/03/2001","01/05/2001")
	h1 = var_Items.InsertItem(h,0,"Item 3")
	var_Items.AddBar(h1,"Task","01/04/2001","01/06/2001")
	var_Items.AddBar(h1,"Task","01/01/2001","01/03/2001","green")
	// var_Items.ItemBar(h1,"green",33) = 65280
	with (oG2antt)
		TemplateDef = [Dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.ItemBar(h1,"green",33) = 65280]
	endwith
	var_Items.AddBar(h1,"Task","01/08/2001","01/10/2001","red")
	// var_Items.ItemBar(h1,"red",33) = 255
	with (oG2antt)
		TemplateDef = [Dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.ItemBar(h1,"red",33) = 255]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oG2antt)
		TemplateDef = [Dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = true]
	endwith
	var_Items.SelectAll()
oG2antt.EndUpdate()
XBasic (Alpha Five) Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
Dim h as N
Dim h1 as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.SingleSel = .f.
var_Chart = oG2antt.Chart
	var_Chart.LevelCount = 2
	var_Chart.AllowLinkBars = .f.
	var_Chart.DrawGridLines = -1
	var_Chart.FirstVisibleDate = {12/29/2000}
	var_Chart.HistogramVisible = .t.
	var_Chart.HistogramHeight = 72
	' var_Chart.PaneWidth(.f.) = 64
	oG2antt.TemplateDef = "Dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 64"

	var_Chart.HistogramView = 1298 'exHistogramSelectedItems + exHistogramUnlockedItems + exHistogramLeafItems + exHistogramNoGrouping
	var_Bar = var_Chart.Bars.Item("Task")
		var_Bar.HistogramType = 256
		var_Bar.HistogramItems = 6
		var_Bar.HistogramPattern = var_Bar.Pattern
		var_Bar.HistogramCumulativeOriginalColorBars = 1
oG2antt.Columns.Add("Column")
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	' var_Items.ItemBold(h) = .t.
	oG2antt.TemplateDef = "Dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ItemBold(h) = True"

	' var_Items.SelectableItem(h) = .f.
	oG2antt.TemplateDef = "Dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.SelectableItem(h) = False"

	h1 = var_Items.InsertItem(h,0,"Item 1")
	var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001})
	h1 = var_Items.InsertItem(h,0,"Item 2")
	var_Items.AddBar(h1,"Task",{01/03/2001},{01/05/2001})
	h1 = var_Items.InsertItem(h,0,"Item 3")
	var_Items.AddBar(h1,"Task",{01/04/2001},{01/06/2001})
	var_Items.AddBar(h1,"Task",{01/01/2001},{01/03/2001},"green")
	' var_Items.ItemBar(h1,"green",33) = 65280
	oG2antt.TemplateDef = "Dim var_Items,h1"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h1
	oG2antt.Template = "var_Items.ItemBar(h1,\"green\",33) = 65280"

	var_Items.AddBar(h1,"Task",{01/08/2001},{01/10/2001},"red")
	' var_Items.ItemBar(h1,"red",33) = 255
	oG2antt.TemplateDef = "Dim var_Items,h1"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h1
	oG2antt.Template = "var_Items.ItemBar(h1,\"red\",33) = 255"

	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "Dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	var_Items.SelectAll()
oG2antt.EndUpdate()
Delphi 8 (.NET only) Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
with AxG2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	with Chart do
	begin
		LevelCount := 2;
		AllowLinkBars := False;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
		FirstVisibleDate := '12/29/2000';
		HistogramVisible := True;
		HistogramHeight := 72;
		PaneWidth[False] := 64;
		HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping);
		with Bars.Item['Task'] do
		begin
			HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistCumulative;
			HistogramItems := 6;
			HistogramPattern := Pattern;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor;
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project');
		ItemBold[h] := True;
		SelectableItem[h] := False;
		h1 := InsertItem(h,TObject(0),'Item 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001',Nil,Nil);
		h1 := InsertItem(h,TObject(0),'Item 2');
		AddBar(h1,'Task','1/3/2001','1/5/2001',Nil,Nil);
		h1 := InsertItem(h,TObject(0),'Item 3');
		AddBar(h1,'Task','1/4/2001','1/6/2001',Nil,Nil);
		AddBar(h1,'Task','1/1/2001','1/3/2001','green',Nil);
		ItemBar[h1,'green',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280);
		AddBar(h1,'Task','1/8/2001','1/10/2001','red',Nil);
		ItemBar[h1,'red',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		ExpandItem[h] := True;
		SelectAll();
	end;
	EndUpdate();
end
Delphi (standard) Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	with Chart do
	begin
		LevelCount := 2;
		AllowLinkBars := False;
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		FirstVisibleDate := '12/29/2000';
		HistogramVisible := True;
		HistogramHeight := 72;
		PaneWidth[False] := 64;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramSelectedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping);
		with Bars.Item['Task'] do
		begin
			HistogramType := EXG2ANTTLib_TLB.exHistCumulative;
			HistogramItems := 6;
			HistogramPattern := Pattern;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib_TLB.exKeepOriginalColor;
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project');
		ItemBold[h] := True;
		SelectableItem[h] := False;
		h1 := InsertItem(h,OleVariant(0),'Item 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001',Null,Null);
		h1 := InsertItem(h,OleVariant(0),'Item 2');
		AddBar(h1,'Task','1/3/2001','1/5/2001',Null,Null);
		h1 := InsertItem(h,OleVariant(0),'Item 3');
		AddBar(h1,'Task','1/4/2001','1/6/2001',Null,Null);
		AddBar(h1,'Task','1/1/2001','1/3/2001','green',Null);
		ItemBar[h1,'green',EXG2ANTTLib_TLB.exBarColor] := OleVariant(65280);
		AddBar(h1,'Task','1/8/2001','1/10/2001','red',Null);
		ItemBar[h1,'red',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		ExpandItem[h] := True;
		SelectAll();
	end;
	EndUpdate();
end
Visual Objects Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h,h1 as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SingleSel := false
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:LevelCount := 2
	var_Chart:AllowLinkBars := false
	var_Chart:DrawGridLines := exAllLines
	var_Chart:FirstVisibleDate := SToD("20001229")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramHeight := 72
	var_Chart:[PaneWidth,false] := 64
	var_Chart:HistogramView := exHistogramSelectedItems | exHistogramUnlockedItems | exHistogramLeafItems | exHistogramNoGrouping
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramType := exHistCumulative
		var_Bar:HistogramItems := 6
		var_Bar:HistogramPattern := var_Bar:Pattern
		var_Bar:HistogramCumulativeOriginalColorBars := exKeepOriginalColor
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Project")
	var_Items:[ItemBold,h] := true
	var_Items:[SelectableItem,h] := false
	h1 := var_Items:InsertItem(h,0,"Item 1")
	var_Items:AddBar(h1,"Task",SToD("20010102"),SToD("20010104"),nil,nil)
	h1 := var_Items:InsertItem(h,0,"Item 2")
	var_Items:AddBar(h1,"Task",SToD("20010103"),SToD("20010105"),nil,nil)
	h1 := var_Items:InsertItem(h,0,"Item 3")
	var_Items:AddBar(h1,"Task",SToD("20010104"),SToD("20010106"),nil,nil)
	var_Items:AddBar(h1,"Task",SToD("20010101"),SToD("20010103"),"green",nil)
	var_Items:[ItemBar,h1,"green",exBarColor] := 65280
	var_Items:AddBar(h1,"Task",SToD("20010108"),SToD("20010110"),"red",nil)
	var_Items:[ItemBar,h1,"red",exBarColor] := 255
	var_Items:[ExpandItem,h] := true
	var_Items:SelectAll()
oDCOCX_Exontrol1:EndUpdate()
PowerBuilder Is it possible to define the bar colors, and have the cumulative histogram showing the same colors?
OleObject oG2antt,var_Bar,var_Chart,var_Items
any h,h1

oG2antt = ole_1.Object
oG2antt.BeginUpdate()
oG2antt.SingleSel = false
var_Chart = oG2antt.Chart
	var_Chart.LevelCount = 2
	var_Chart.AllowLinkBars = false
	var_Chart.DrawGridLines = -1
	var_Chart.FirstVisibleDate = 2000-12-29
	var_Chart.HistogramVisible = true
	var_Chart.HistogramHeight = 72
	var_Chart.PaneWidth(false,64)
	var_Chart.HistogramView = 1298 /*exHistogramSelectedItems | exHistogramUnlockedItems | exHistogramLeafItems | exHistogramNoGrouping*/
	var_Bar = var_Chart.Bars.Item("Task")
		var_Bar.HistogramType = 256
		var_Bar.HistogramItems = 6
		var_Bar.HistogramPattern = var_Bar.Pattern
		var_Bar.HistogramCumulativeOriginalColorBars = 1
oG2antt.Columns.Add("Column")
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	var_Items.ItemBold(h,true)
	var_Items.SelectableItem(h,false)
	h1 = var_Items.InsertItem(h,0,"Item 1")
	var_Items.AddBar(h1,"Task",2001-01-02,2001-01-04)
	h1 = var_Items.InsertItem(h,0,"Item 2")
	var_Items.AddBar(h1,"Task",2001-01-03,2001-01-05)
	h1 = var_Items.InsertItem(h,0,"Item 3")
	var_Items.AddBar(h1,"Task",2001-01-04,2001-01-06)
	var_Items.AddBar(h1,"Task",2001-01-01,2001-01-03,"green")
	var_Items.ItemBar(h1,"green",33,65280)
	var_Items.AddBar(h1,"Task",2001-01-08,2001-01-10,"red")
	var_Items.ItemBar(h1,"red",33,255)
	var_Items.ExpandItem(h,true)
	var_Items.SelectAll()
oG2antt.EndUpdate()

Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.