Commit 46539a24 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

ENH: Removing obsolete vtkSMChartRepresentationProxy and renaming

vtkSMChartTableRepresentationProxy as vtkSMChartRepresentationProxy.
parent 414bcb8b
......@@ -32,7 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqBarChartDisplayPanel.h"
#include "ui_pqBarChartDisplayPanel.h"
#include "vtkSMChartTableRepresentationProxy.h"
#include "vtkSMChartRepresentationProxy.h"
#include "vtkSMIntVectorProperty.h"
#include <QPointer>
......@@ -62,7 +62,7 @@ public:
}
pqPropertyLinks Links;
vtkWeakPointer<vtkSMChartTableRepresentationProxy> ChartRepresentation;
vtkWeakPointer<vtkSMChartRepresentationProxy> ChartRepresentation;
pqChartSeriesEditorModel *Model;
};
......@@ -70,13 +70,13 @@ public:
pqBarChartDisplayPanel::pqBarChartDisplayPanel(pqRepresentation* repr,
QWidget* parentObject): Superclass(repr, parentObject), Internal(0)
{
vtkSMChartTableRepresentationProxy* proxy =
vtkSMChartTableRepresentationProxy::SafeDownCast(repr->getProxy());
vtkSMChartRepresentationProxy* proxy =
vtkSMChartRepresentationProxy::SafeDownCast(repr->getProxy());
if (!proxy)
{
this->setEnabled(false);
qCritical() << "pqBarChartDisplayPanel "
"can only work with vtkSMChartTableRepresentationProxy";
"can only work with vtkSMChartRepresentationProxy";
return;
}
......
......@@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vtkQtChartRepresentation.h"
#include "vtkQtChartSeriesOptionsModel.h"
#include "vtkQtChartTableSeriesModel.h"
#include "vtkSMChartTableRepresentationProxy.h"
#include "vtkSMChartRepresentationProxy.h"
#include "vtkSMPropertyHelper.h"
#include <QPixmap>
......@@ -73,8 +73,8 @@ void pqChartSeriesEditorModel::setRepresentation(pqDataRepresentation *repr)
QObject::disconnect(this->Representation, 0, this, 0);
}
vtkSMChartTableRepresentationProxy* chartRep =
vtkSMChartTableRepresentationProxy::SafeDownCast(repr->getProxy());
vtkSMChartRepresentationProxy* chartRep =
vtkSMChartRepresentationProxy::SafeDownCast(repr->getProxy());
this->RepresentationProxy = chartRep;
this->Representation = repr;
......
......@@ -41,7 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class pqDataRepresentation;
class vtkQtChartSeriesOptions;
class vtkSMChartTableRepresentationProxy;
class vtkSMChartRepresentationProxy;
/// pqChartSeriesEditorModel is a model that can be used to connect to a
/// Tree or Table view that shows the series that be plotted. It allows the user
......@@ -167,7 +167,7 @@ private slots:
private:
QPointer<pqDataRepresentation> Representation;
vtkWeakPointer<vtkSMChartTableRepresentationProxy> RepresentationProxy;
vtkWeakPointer<vtkSMChartRepresentationProxy> RepresentationProxy;
private:
pqChartSeriesEditorModel(const pqChartSeriesEditorModel&); // Not implemented.
......
......@@ -32,7 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqLineChartDisplayPanel.h"
#include "ui_pqLineChartDisplayPanel.h"
#include "vtkSMChartTableRepresentationProxy.h"
#include "vtkSMChartRepresentationProxy.h"
#include "vtkQtChartRepresentation.h"
#include "vtkDataArray.h"
#include "vtkDataObject.h"
......@@ -140,7 +140,7 @@ public:
pqComboBoxDomain* XAxisArrayDomain;
pqSignalAdaptorCompositeTreeWidget* CompositeIndexAdaptor;
vtkWeakPointer<vtkSMChartTableRepresentationProxy> ChartRepresentation;
vtkWeakPointer<vtkSMChartRepresentationProxy> ChartRepresentation;
pqChartSeriesEditorModel *Model;
......@@ -224,8 +224,8 @@ void pqLineChartDisplayPanel::setDisplay(pqRepresentation* disp)
// all "cleanup" code, since it's not applicable.
assert(this->Internal->ChartRepresentation == 0);
vtkSMChartTableRepresentationProxy* proxy =
vtkSMChartTableRepresentationProxy::SafeDownCast(disp->getProxy());
vtkSMChartRepresentationProxy* proxy =
vtkSMChartRepresentationProxy::SafeDownCast(disp->getProxy());
this->Internal->ChartRepresentation = proxy;
if (!this->Internal->ChartRepresentation)
{
......
......@@ -46,8 +46,6 @@ SET(Kit_SRCS
vtkSMCameraLink.cxx
vtkSMCameraManipulatorProxy.cxx
vtkSMCameraProxy.cxx
vtkSMChartRepresentationProxy.cxx
#vtkSMChartRepresentationProxy2.cxx
vtkSMClientDeliveryRepresentationProxy.cxx
vtkSMClientDeliveryStrategyProxy.cxx
vtkSMClientServerRenderSyncManagerHelper.cxx
......@@ -224,7 +222,7 @@ IF (VTK_USE_QVTK)
vtkSMChartingArraysInformationHelper.cxx
vtkSMChartNamedOptionsModelProxy.cxx
vtkSMChartOptionsProxy.cxx
vtkSMChartTableRepresentationProxy.cxx
vtkSMChartRepresentationProxy.cxx
vtkSMChartViewProxy.cxx
vtkSMLineChartViewProxy.cxx
)
......
......@@ -7424,7 +7424,7 @@
<!-- =================================================================== -->
#ifdef VTK_USE_QVTK
<ChartTableRepresentationProxy name="BarChartRepresentation"
<ChartRepresentationProxy name="BarChartRepresentation"
base_proxygroup="representations"
base_proxyname="ChartRepresentationBase" >
<Documentation>
......@@ -7460,13 +7460,13 @@
</SubProxy>
<!-- End of BarChartRepresentation -->
</ChartTableRepresentationProxy>
</ChartRepresentationProxy>
#endif
<!-- =================================================================== -->
#ifdef VTK_USE_QVTK
<ChartTableRepresentationProxy name="XYPlotRepresentation"
<ChartRepresentationProxy name="XYPlotRepresentation"
base_proxygroup="representations"
base_proxyname="ChartRepresentationBase" >
<Documentation>
......@@ -7505,7 +7505,7 @@
</SubProxy>
<!-- End of XYPlotRepresentation -->
</ChartTableRepresentationProxy>
</ChartRepresentationProxy>
#endif
......
......@@ -49,7 +49,7 @@ protected:
vtkSMChartNamedOptionsModelProxy();
~vtkSMChartNamedOptionsModelProxy();
friend class vtkSMChartTableRepresentationProxy;
friend class vtkSMChartRepresentationProxy;
// Description:
// Returns the options for a series with the name. A new instance is created
......
......@@ -14,21 +14,37 @@
=========================================================================*/
#include "vtkSMChartRepresentationProxy.h"
#include "vtkDataObject.h"
#include "vtkObjectFactory.h"
#include "vtkSMProperty.h"
#include "vtkSMPropertyHelper.h"
#include "vtkSMSourceProxy.h"
#include "vtkQtChartNamedSeriesOptionsModel.h"
#include "vtkQtChartRepresentation.h"
#include "vtkQtChartView.h"
#include "vtkSMChartNamedOptionsModelProxy.h"
#include "vtkSMChartViewProxy.h"
vtkStandardNewMacro(vtkSMChartRepresentationProxy);
vtkCxxRevisionMacro(vtkSMChartRepresentationProxy, "1.2");
vtkCxxRevisionMacro(vtkSMChartRepresentationProxy, "1.3");
//----------------------------------------------------------------------------
vtkSMChartRepresentationProxy::vtkSMChartRepresentationProxy()
{
this->VTKRepresentation = vtkQtChartRepresentation::New();
this->Visibility = 0;
this->UseIndexForXAxis = true;
this->XSeriesName = 0;
}
//----------------------------------------------------------------------------
vtkSMChartRepresentationProxy::~vtkSMChartRepresentationProxy()
{
this->SetXSeriesName(0);
this->VTKRepresentation->Delete();
}
//----------------------------------------------------------------------------
void vtkSMChartRepresentationProxy::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
//----------------------------------------------------------------------------
......@@ -43,30 +59,126 @@ bool vtkSMChartRepresentationProxy::EndCreateVTKObjects()
// always deliver tables.
this->SetReductionType(vtkSMClientDeliveryRepresentationProxy::TABLE_MERGE);
if (this->GetSubProxy("DummyConsumer"))
this->OptionsProxy = vtkSMChartNamedOptionsModelProxy::SafeDownCast(
this->GetSubProxy("SeriesOptions"));
this->OptionsProxy->CreateObjects(this->VTKRepresentation);
this->VTKRepresentation->SetOptionsModel(
this->OptionsProxy->GetOptionsModel());
return true;
}
//----------------------------------------------------------------------------
bool vtkSMChartRepresentationProxy::AddToView(vtkSMViewProxy* view)
{
if (!this->Superclass::AddToView(view))
{
vtkSMPropertyHelper(this->GetSubProxy("DummyConsumer"), "Input").Set(
this->PreProcessorProxy);
return false;
}
vtkSMChartViewProxy* chartView = vtkSMChartViewProxy::SafeDownCast(
view);
if (!chartView)
{
return false;
}
this->ChartViewProxy = chartView;
if (this->Visibility)
{
this->ChartViewProxy->GetChartView()->AddRepresentation(
this->VTKRepresentation);
}
return true;
}
//----------------------------------------------------------------------------
void vtkSMChartRepresentationProxy::Update(vtkSMViewProxy* view)
bool vtkSMChartRepresentationProxy::RemoveFromView(vtkSMViewProxy* view)
{
this->Superclass::Update(view);
vtkSMChartViewProxy* barChartView = vtkSMChartViewProxy::SafeDownCast(
view);
if (!barChartView || barChartView != this->ChartViewProxy)
{
return false;
}
if (this->GetSubProxy("DummyConsumer"))
if (this->Visibility && this->ChartViewProxy)
{
vtkSMProxy* subProxy = this->GetSubProxy("DummyConsumer");
subProxy->GetProperty("Input")->UpdateDependentDomains();
this->ChartViewProxy->GetChartView()->RemoveRepresentation(
this->VTKRepresentation);
}
this->ChartViewProxy = 0;
return this->Superclass::RemoveFromView(view);
}
//----------------------------------------------------------------------------
void vtkSMChartRepresentationProxy::PrintSelf(ostream& os, vtkIndent indent)
void vtkSMChartRepresentationProxy::SetVisibility(int visible)
{
this->Superclass::PrintSelf(os, indent);
if (this->Visibility != visible)
{
this->Visibility = visible;
if (this->ChartViewProxy)
{
if (this->Visibility)
{
this->ChartViewProxy->GetChartView()->AddRepresentation(
this->VTKRepresentation);
}
else
{
this->ChartViewProxy->GetChartView()->RemoveRepresentation(
this->VTKRepresentation);
}
}
}
}
//----------------------------------------------------------------------------
void vtkSMChartRepresentationProxy::Update(vtkSMViewProxy* view)
{
this->Superclass::Update(view);
this->VTKRepresentation->SetInputConnection(
this->GetOutput()->GetProducerPort());
this->VTKRepresentation->Update();
this->UpdatePropertyInformation();
}
//----------------------------------------------------------------------------
int vtkSMChartRepresentationProxy::GetNumberOfSeries()
{
return this->VTKRepresentation->GetNumberOfSeries();
}
//----------------------------------------------------------------------------
const char* vtkSMChartRepresentationProxy::GetSeriesName(int series)
{
return this->VTKRepresentation->GetSeriesName(series);
}
//----------------------------------------------------------------------------
void vtkSMChartRepresentationProxy::SetUseIndexForXAxis(bool use_index)
{
this->UseIndexForXAxis = use_index;
this->UpdateXSeriesName();
this->Modified();
}
//----------------------------------------------------------------------------
void vtkSMChartRepresentationProxy::SetXAxisSeriesName(const char* name)
{
this->SetXSeriesName(name);
this->UpdateXSeriesName();
this->Modified();
}
//----------------------------------------------------------------------------
void vtkSMChartRepresentationProxy::UpdateXSeriesName()
{
if (!this->UseIndexForXAxis && this->XSeriesName && this->XSeriesName[0])
{
this->VTKRepresentation->SetKeyColumn(this->XSeriesName);
}
else
{
this->VTKRepresentation->SetKeyColumn(0);
}
}
......@@ -12,26 +12,45 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkSMChartRepresentationProxy - representation proxy used by most of
// the charts.
// .NAME vtkSMChartRepresentationProxy
// .SECTION Description
// vtkSMChartRepresentationProxy is representation proxy used by bar chart,
// xy-line plot etc.
//
#ifndef __vtkSMChartRepresentationProxy_h
#define __vtkSMChartRepresentationProxy_h
#include "vtkSMClientDeliveryRepresentationProxy.h"
#include "vtkWeakPointer.h" // needed for vtkWeakPointer.
class VTK_EXPORT vtkSMChartRepresentationProxy :
public vtkSMClientDeliveryRepresentationProxy
class vtkQtChartRepresentation;
class vtkSMChartViewProxy;
class vtkSMChartNamedOptionsModelProxy;
class VTK_EXPORT vtkSMChartRepresentationProxy : public vtkSMClientDeliveryRepresentationProxy
{
public:
static vtkSMChartRepresentationProxy* New();
vtkTypeRevisionMacro(vtkSMChartRepresentationProxy,
vtkSMClientDeliveryRepresentationProxy);
vtkTypeRevisionMacro(vtkSMChartRepresentationProxy, vtkSMChartRepresentationProxy);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Provides access to the underlying VTK representation.
vtkGetObjectMacro(VTKRepresentation, vtkQtChartRepresentation);
// Description:
// Called when a representation is added to a view.
// Returns true on success.
// Currently a representation can be added to only one view.
// Don't call this directly, it is called by the View.
virtual bool AddToView(vtkSMViewProxy* view);
// Description:
// Called to remove a representation from a view.
// Returns true on success.
// Currently a representation can be added to only one view.
// Don't call this directly, it is called by the View.
virtual bool RemoveFromView(vtkSMViewProxy* view);
// Description:
// Called to update the Display. Default implementation does nothing.
// Argument is the view requesting the update. Can be null in the
......@@ -39,17 +58,50 @@ public:
virtual void Update() { this->Superclass::Update(); }
virtual void Update(vtkSMViewProxy* view);
// Description:
// Set visibility of the representation.
// Don't call directly. This method must be called through properties alone.
void SetVisibility(int visible);
// Description:
// Get the number of series in this representation
int GetNumberOfSeries();
// Description:
// Get the name of the series with the given index. Returns 0 is the index
// is out of range. The returned pointer is only valid until the next call
// to GetSeriesName.
const char* GetSeriesName(int series);
// Description:
// Set the series to use as the X-axis.
void SetXAxisSeriesName(const char* name);
// Description:
// When set, the array index will be used for X axis, otherwise the array
// identified by XArrayName will be used.
void SetUseIndexForXAxis(bool use_index);
//BTX
protected:
vtkSMChartRepresentationProxy();
~vtkSMChartRepresentationProxy();
// Description:
// This method is called after CreateVTKObjects().
// This gives subclasses an opportunity to do some post-creation
// initialization.
virtual bool EndCreateVTKObjects();
// Description:
// Called by SetXAxisSeriesName and SetUseIndexForXAxis to update the
// KeyColumn for the internal chart.
void UpdateXSeriesName();
vtkWeakPointer<vtkSMChartViewProxy> ChartViewProxy;
vtkQtChartRepresentation* VTKRepresentation;
vtkSMChartNamedOptionsModelProxy* OptionsProxy;
int Visibility;
bool UseIndexForXAxis;
char* XSeriesName;
vtkSetStringMacro(XSeriesName);
private:
vtkSMChartRepresentationProxy(const vtkSMChartRepresentationProxy&); // Not implemented
void operator=(const vtkSMChartRepresentationProxy&); // Not implemented
......
/*=========================================================================
Program: ParaView
Module: vtkSMChartTableRepresentationProxy.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkSMChartTableRepresentationProxy.h"
#include "vtkDataObject.h"
#include "vtkObjectFactory.h"
#include "vtkQtChartNamedSeriesOptionsModel.h"
#include "vtkQtChartRepresentation.h"
#include "vtkQtChartView.h"
#include "vtkSMChartNamedOptionsModelProxy.h"
#include "vtkSMChartViewProxy.h"
vtkStandardNewMacro(vtkSMChartTableRepresentationProxy);
vtkCxxRevisionMacro(vtkSMChartTableRepresentationProxy, "1.2");
//----------------------------------------------------------------------------
vtkSMChartTableRepresentationProxy::vtkSMChartTableRepresentationProxy()
{
this->VTKRepresentation = vtkQtChartRepresentation::New();
this->Visibility = 0;
this->UseIndexForXAxis = true;
this->XSeriesName = 0;
}
//----------------------------------------------------------------------------
vtkSMChartTableRepresentationProxy::~vtkSMChartTableRepresentationProxy()
{
this->SetXSeriesName(0);
this->VTKRepresentation->Delete();
}
//----------------------------------------------------------------------------
void vtkSMChartTableRepresentationProxy::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
//----------------------------------------------------------------------------
bool vtkSMChartTableRepresentationProxy::EndCreateVTKObjects()
{
if (!this->Superclass::EndCreateVTKObjects())
{
return false;
}
this->OptionsProxy = vtkSMChartNamedOptionsModelProxy::SafeDownCast(
this->GetSubProxy("SeriesOptions"));
this->OptionsProxy->CreateObjects(this->VTKRepresentation);
this->VTKRepresentation->SetOptionsModel(
this->OptionsProxy->GetOptionsModel());
return true;
}
//----------------------------------------------------------------------------
bool vtkSMChartTableRepresentationProxy::AddToView(vtkSMViewProxy* view)
{
if (!this->Superclass::AddToView(view))
{
return false;
}
vtkSMChartViewProxy* chartView = vtkSMChartViewProxy::SafeDownCast(
view);
if (!chartView)
{
return false;
}
this->ChartViewProxy = chartView;
if (this->Visibility)
{
this->ChartViewProxy->GetChartView()->AddRepresentation(
this->VTKRepresentation);
}
return true;
}
//----------------------------------------------------------------------------
bool vtkSMChartTableRepresentationProxy::RemoveFromView(vtkSMViewProxy* view)
{
vtkSMChartViewProxy* barChartView = vtkSMChartViewProxy::SafeDownCast(
view);
if (!barChartView || barChartView != this->ChartViewProxy)
{
return false;
}
if (this->Visibility && this->ChartViewProxy)
{
this->ChartViewProxy->GetChartView()->RemoveRepresentation(
this->VTKRepresentation);
}
this->ChartViewProxy = 0;
return this->Superclass::RemoveFromView(view);
}
//----------------------------------------------------------------------------
void vtkSMChartTableRepresentationProxy::SetVisibility(int visible)
{
if (this->Visibility != visible)
{
this->Visibility = visible;
if (this->ChartViewProxy)
{
if (this->Visibility)
{
this->ChartViewProxy->GetChartView()->AddRepresentation(
this->VTKRepresentation);
}
else
{
this->ChartViewProxy->GetChartView()->RemoveRepresentation(
this->VTKRepresentation);
}
}
}
}
//----------------------------------------------------------------------------
void vtkSMChartTableRepresentationProxy::Update(vtkSMViewProxy* view)
{
this->Superclass::Update(view);
this->VTKRepresentation->SetInputConnection(
this->GetOutput()->GetProducerPort());
this->VTKRepresentation->Update();
this->UpdatePropertyInformation();
}
//----------------------------------------------------------------------------
int vtkSMChartTableRepresentationProxy::GetNumberOfSeries()
{
return this->VTKRepresentation->GetNumberOfSeries();
}
//----------------------------------------------------------------------------
const char* vtkSMChartTableRepresentationProxy::GetSeriesName(int series)
{
return this->VTKRepresentation->GetSeriesName(series);
}
//----------------------------------------------------------------------------
void vtkSMChartTableRepresentationProxy::SetUseIndexForXAxis(bool use_index)
{
this->UseIndexForXAxis = use_index;
this->UpdateXSeriesName();
this->Modified();
}
//----------------------------------------------------------------------------
void vtkSMChartTableRepresentationProxy::SetXAxisSeriesName(const char* name)
{
this->SetXSeriesName(name);
this->UpdateXSeriesName();
this->Modified();
}
//----------------------------------------------------------------------------
void vtkSMChartTableRepresentationProxy::UpdateXSeriesName()
{
if (!this->UseIndexForXAxis && this->XSeriesName && this->XSeriesName[0])
{
this->VTKRepresentation->SetKeyColumn(this->XSeriesName);
}
else
{
this->VTKRepresentation->SetKeyColumn(0);
}
}
/*=========================================================================
Program: ParaView
Module: vtkSMChartTableRepresentationProxy.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkSMChartTableRepresentationProxy
// .SECTION Description
//
#ifndef __vtkSMChartTableRepresentationProxy_h
#define __vtkSMChartTableRepresentationProxy_h
#include "vtkSMChartRepresentationProxy.h"
#include "vtkWeakPointer.h" // needed for vtkWeakPointer.
class vtkQtChartRepresentation;
class vtkSMChartViewProxy;
class vtkSMChartNamedOptionsModelProxy;
class VTK_EXPORT vtkSMChartTableRepresentationProxy : public vtkSMChartRepresentationProxy
{
public:
static vtkSMChartTableRepresentationProxy* New();
vtkTypeRevisionMacro(vtkSMChartTableRepresentationProxy, vtkSMChartRepresentationProxy);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Provides access to the underlying VTK representation.
vtkGetObjectMacro(VTKRepresentation, vtkQtChartRepresentation);
// Description:
// Called when a representation is added to a view.
// Returns true on success.
// Currently a representation can be added to only one view.
// Don't call this directly, it is called by the View.
virtual bool AddToView(vtkSMViewProxy* view);
// Description:
// Called to remove a representation from a view.
// Returns true on success.
// Currently a representation can be added to only one view.
// Don't call this directly, it is called by the View.
virtual bool RemoveFromView(vtkSMViewProxy* view);
// Description:
// Called to update the Display. Default implementation does nothing.
// Argument is the view requesting the update. Can be null in the
// case when something other than a view is requesting the update.
virtual void Update() { this->Superclass::Update(); }
virtual void Update(vtkSMViewProxy* view);
// Description:
// Set visibility of the representation.
// Don't call directly. This method must be called through properties alone.
void SetVisibility(int visible);
// Description:
// Get the number of series in this representation
int GetNumberOfSeries();
// Description:
// Get the name of the series with the given index. Returns 0 is the index
// is out of range. The returned pointer is only valid until the next call
// to GetSeriesName.
const char* GetSeriesName(int series);
// Description:
// Set the series to use as the X-axis.
void SetXAxisSeriesName(const char* name);
// Description:
// When set, the array index will be used for X axis, otherwise the array
// identified by XArrayName will be used.
void SetUseIndexForXAxis(bool use_index);
//BTX