[Paraview-developers] Chart Legend in CustomRenderView: Need Help
Pandu tech
pandu4tech at gmail.com
Mon Mar 12 10:43:14 EDT 2012
Hi,
I observed that vtkChartLegend is used in vtkPVXYChartView.
Code:
void vtkPVXYChartView::SetChartType(const char *type)
{
// Construct the correct type of chart
if (strcmp(type, "Line") == 0 || strcmp(type, "Bar") == 0)
{
this->Chart = vtkChartXY::New(); // in vtkChartXY ctor, vtkChartLegend
is created
}
In my customRenderView, is it possible to use this vtkChartLegend. Can you
please suggest how do I get similar ChartLegend in my view?
Appreciate your help in this regard.
Thanks in advance,
Hanumanth.
On Fri, Mar 9, 2012 at 5:25 PM, Pandu tech <pandu4tech at gmail.com> wrote:
>
> Hi,
>
>
> I am trying to implement a legend in a new view that I have created. I
> would like to get information from the data currently visible (typically
> field data stored in the dataset) and populate the legend box with this.
> My view is derived from vtkPVRenderView and I can add a vtkLegendBoxActor
> but I’m not sure how I get the information I want in order to update it.
> Is it possible to either request information about the object from the
> server or get the information from the representation? If so, where do I
> need to implement this?
>
>
>
> Alternatively, can anyone suggest a better way to do this?
>
>
> I can see that in XYChartView we have a Chart Legend (which is nice as it
> is movable) and I’m not sure whether this will work for me or how it gets
> its information.
>
>
>
> Any help would be appreciated.
>
>
> Thanks in advance,
> Hanumanth.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20120312/566b30e9/attachment.htm>
More information about the Paraview-developers
mailing list