Ruddy LEFEBVRE Posted October 19, 2016 Share Posted October 19, 2016 Hello ! I need some help again ...I've got a combination with theseexpressions : YAxis :Sum([sales]) as [sales], count() as [CNT] XAxis : ColorAxis : I want to change the SerieType only for the CNT so here is the script that work : from Spotfire.Dxp.Application.Visuals import CombinationChart,CombinationChartSeriesType vc = visual.As[CombinationChart]() vc.SeriesType = CombinationChartSeriesType.Bar vc.IndexedSeriesType.Item["CNT"] = CombinationChartSeriesType.Line Now harder, i want to compare with the last month that is filtered, so i change this expression : ColorAxis : It seems to work because i can see in the legend : (bars) Sales >> September (bars) Sales >> October (line) CNT >> September (line) CNT >> October but the combination chart doesn't update and it displays only bars I Have to click on "Line" that is already checked in the series properties to see the change. Do you have the solution Thanks Link to comment Share on other sites More sharing options...
Andrew Berridge Posted October 19, 2016 Share Posted October 19, 2016 Hi - I think the problem is that the chart is getting a bit confused. After you change the axis, the chart will create a new series and autoconfigure that (in the UI) but you need to tell it what you want to do with the series when you're using the API. Please try changing the series to line type using the API again after updating the axis: vc.IndexedSeriesType.Item["CNT"] = CombinationChartSeriesType.Line I hope that makes sense and please post back to tell me if it works. Andrew (TIBCO Data Science) Link to comment Share on other sites More sharing options...
Ruddy LEFEBVRE Posted October 20, 2016 Author Share Posted October 20, 2016 Thanks for your answer Link to comment Share on other sites More sharing options...
Ruddy LEFEBVRE Posted October 20, 2016 Author Share Posted October 20, 2016 I change the ColorAxis expression first then i change the serie to line type with the script below :from Spotfire.Dxp.Application.Visuals import CombinationChart,CombinationChartSeriesTypevc = visual.As[CombinationChart]() vc.SeriesType = CombinationChartSeriesType.Bar vc.ColorAxis.Expression = "<[Axis.Default.Names] NEST [MONTH]>" vc.IndexedSeriesType.Item["CNT"] = CombinationChartSeriesType.LineBut there is still no lines displaying in the combination chart. Link to comment Share on other sites More sharing options...
Andrew Berridge Posted October 20, 2016 Share Posted October 20, 2016 Hmmm.... It's more complicated than I first realised. I'll need some more time to look at it. Andrew Link to comment Share on other sites More sharing options...
Andrew Berridge Posted October 31, 2016 Share Posted October 31, 2016 Hi - do you still need this I've been busy the last couple of weeks but could take another look this week. Andrew Link to comment Share on other sites More sharing options...
Ruddy LEFEBVRE Posted November 3, 2016 Author Share Posted November 3, 2016 Hello, yes i'm still searching for a solution. Thank you for your help Link to comment Share on other sites More sharing options...
Ruddy LEFEBVRE Posted November 18, 2016 Author Share Posted November 18, 2016 Did you find something for me Link to comment Share on other sites More sharing options...
Andrew Berridge Posted November 21, 2016 Share Posted November 21, 2016 Hi - I'm sorry it's taken so long for me to get back to you. I have been extremely busy! I've investigated this as much as I am able and suspect it's a bug. Do you have a Support Account https://support.tibco.com I think the problem is potentially caused by the different Category Keys (e.g. Count >> Feb), but unfortunately there's no easy way of enumerating them all and setting the series to lines. Here's my code, but it causes Spotfire to hang. from Spotfire.Dxp.Application.Visuals import CombinationChart,CombinationChartSeriesType, CategoryKey from System import Array strArray = Array[str](["Count", "Feb"]) ck = CategoryKey(strArray) vc = visual.As[CombinationChart]() vc.SeriesType = CombinationChartSeriesType.Bar vc.ColorAxis.Expression = '' vc.IndexedSeriesType.Item["Count"] = CombinationChartSeriesType.LineI have also attached a DXP. If at all possible, I suggest submitting it along with the support request, and pointing them to this Question/Answer page. Thanks! Andrew (TIBCO Data Science) Link to comment Share on other sites More sharing options...
Janos Novits Posted June 16, 2020 Share Posted June 16, 2020 are there any updates in this matter I came across the same issue on 10.3 Link to comment Share on other sites More sharing options...
Janos Novits Posted June 18, 2020 Share Posted June 18, 2020 any possible update on this This issue still persist in 10.3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now