Jump to content

Creating Combination Chart using Iron Python Script in Spotfire 5.5.0 and facing issue


Manoj Chaurasia

Recommended Posts

I am trying to create Combination Chart using Iron Python Script in Spotfire 5.5.0 and facing some issue: The issue is Combination Chart is the combination of BAR and LINE, In SERIESTYPE I am able ONLY to Plot either BAR or LINE. The requirement is to plot Two Bar and Two lines. This is code written for creating Combination Chart: from Spotfire.Dxp.Application.Visuals import VisualTypeIdentifiers from Spotfire.Dxp.Application.Visuals import VisualContent from Spotfire.Dxp.Application.Visuals import VisualContent from Spotfire.Dxp.Application.Visuals import VisualTypeIdentifiers from Spotfire.Dxp.Application.Visuals import VisualContent from Spotfire.Dxp.Application.Visuals import Legend from Spotfire.Dxp.Application.Visuals import ColorAxis from Spotfire.Dxp.Application.Visuals import Axis from Spotfire.Dxp.Application.Visuals import IndexedCombinationChartSeriesType from Spotfire.Dxp.Application.Visuals import CombinationChartSeriesType from Spotfire.Dxp.Application.Visuals import LabelVisibility from Spotfire.Dxp.Application.Visuals import LegendItem from Spotfire.Dxp.Application.Visuals import LegendAxisItem for visual in Document.ActivePageReference.Visuals: visual.TypeId = VisualTypeIdentifiers.CombinationChart vc = visual.As[VisualContent]() vc.XAxis.Expression= "" vc.YAxis.Expression="SUM([COLUMN_1) as [COLUMN_1],Sum([COLUMN_2]) as [COLUMN_2],Sum([COLUMN_3]) as[COLUMN_3],SUM([COLUMN_4]) as [COLUMN_5] " vc.ColorAxis.Expression="" vc.XAxis.ShowAxisSelector = False vc.YAxis.ShowAxisSelector = False #vc.SeriesType=CombinationChartSeriesType.Bar vc.Legend.Visible=True vc.ShowDescription=False vc.LabelVisibility=0 visual.Title = "Graph" I also tried finding Index of each Column in YAxis Expression using IndexSeriesType but it returns either BAR or LINE. Please provide any example in Python Script where Combination Chart is plotted using Script
Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...
  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...