I have modified your code, so the AxisArrow tool works in correct way and allow you do scroll of the axis as you want. Therefore, please see next code and consider the indications, because you can use the code without problems.
Considerations:
1.- Check if you there are all classes in the folder as you have your project. If you doesn't have all classes you must copy these from folder Uitilities\New VC Classes as you find, in the folder where you installed TeeChartActivex. The folder is similar as next C:......\TeeChart Pro v2012 ActiveX Control\Utilities\New VC Classes
2.- Use next includes in your code:
#include "stdafx.h"
#include "XXXXX.h"
#include "XXXXX.h"
#include "series.h"
#include "axes.h"
#include "axis.h"
#include "TeeChartDefines.h"
#include "aspect.h"
#include "zoom.h"
#include "scroll.h"
#include "environment.h"
#include "marks.h"
#include "page.h"
#include "lineseries.h"
#include "axisarrowtool.h"
#include "toollist.h"
#include "tools.h"
#include "comutil.h"
#include "afxdisp.h"
3.- The code has been made on the OnInitDialog() of the project.
Code:
Could you tell us if next code works in your end?
{
.
.
.
// TODO: Add extra initialization here
m_tChart1.ClearChart();
long index = m_tChart1.AddSeries(scLine);
m_tChart1.GetAspect().SetView3D(false);
m_tChart1.GetPage().SetMaxPointsPerPage(5);
m_tChart1.Series(index).SetColor(RGB(rand(),rand(),rand()));
m_tChart1.Series(index).SetLegendTitle("Hello");
m_tChart1.Series(index).FillSampleValues(100);
m_tChart1.Series(index).GetMarks().SetVisible(false);
long index1 = m_tChart1.GetTools().Add(tcAxisArrow);
//SetAxisArrow Tool to do scroll.
m_tChart1.GetTools().GetItems(index1).GetAsAxisArrow().SetAxis(COleVariant(short(atBottom)));
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
}
I hope will helps.
Thanks,
Sandra.