Pareto Chart in Vision

I am trying to create a pareto chart for down time reason codes filtered by start date and end date.

Here is what my query outputs:

Down_Time_Reason total_min percent_total
No_Staffing 18995 33
Process_Troubleshooting 11785 20
Inspection 9641 17
Setup 9260 16
Operator_PM 4757 8
Part_Cleaning 1252 2
No_Tools 443 0
No_Parts 46 0

I used the bar chart to output the following:

I would like to plot the percentages with the line as well. I cannot seem to figure out how to do this. Does anyone have any suggestions?

Thanks,
Toshi

@prasath.t did something similar to what you are wanting in this post which includes a downloadable example:

Perhaps you can adapt his work to your usage case.

Another, perhaps simpler option would be to overlay a standard chart over the bar chart and set the Background Color and Plot Background color to transparent. You would also probably want to set Show Legend and Show Popup properties to false.

Doing a quick experiment for proof of concept purposes, I was able to eliminate the rest of the chart's axis features by applying the following script to the configureChart extension function:

#def configureChart(self, chart):
	
	domainAxis = chart.plot.domainAxis
	rangeAxis = chart.plot.rangeAxis
	
	domainAxis.setTickLabelsVisible(False)
	domainAxis.setAxisLineVisible(False)
	domainAxis.setTickMarksVisible(False)
	domainAxis.label = ''
		
	rangeAxis.setTickLabelsVisible(False)
	rangeAxis.setAxisLineVisible(False)
	rangeAxis.setTickMarksVisible(False)
	rangeAxis.label = ''

This was the result:

3 Likes

Thank you! It worked!

1 Like

I am using a popup calendar to filter dates by which the line and bar chart are populated. On selecting certain dates/time I get the following error:

Would you know what caused this @justinedwards.jle ?

Thanks,
Toshi

It appears that the lower date range of the chart's axis is somehow being set to a date that is greater than the upper date range. It's difficult to say how this is happening without knowing more about how the information is flowing. Is it a binding? Is it a script? When does the error occur; at initialization or at date selection?

1 Like

You are correct. The error only pops up when the dates are not in the right format(date selection). I am using a binding.