LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to build a pareto chart

Hi,

 

I'm building a bar chart, but my X scale numbers are not 1-100, they are random: 900, 400, 600, 200, etc. How can I apply these labels retroactively after I plot the sorted data?

 

I don't want the chart trying to sort data based on the x-axis... I tried the x.scale.marker values array but that's not it at all

At least I have chicken
0 Kudos
Message 1 of 3
(3,043 Views)

That is a tough one.  The chart axes do not support what you are suggesting, so you have to bring in something else to trick the viewer.

 

It is not a simple undertaking, but you can make use of the Picture Control, and associated VIs, and recreate the graph in the picture control, along with text labels.

 

You would need the folowing VIs, or something along these lines:

 

Set picture size.vi (starts with a picture constant, takes three inputs (Width,Height,fill color). Outputs new picture

Draw Border.vi (Left, Top, Right, Bottom, line color, fill color)

Draw Horizontal Lines.vi 

Draw Vertical Line.vi

Draw Horizontal Labels.vi

Draw Vertical Labels.vi

Graph to Picture.vi

 

You have to write these, of course.

 

Another possibility is to make use of a third party charting software with ActiveX support, that also supports the chart type you need.  There are some out there, and I 've used one in the past, but my memory fails me.  If I can find a reference to it in old emails, I'll let you know.

0 Kudos
Message 2 of 3
(3,037 Views)

Okay thanks for the reply...I ended up cheating (in case anyone comes upon this thread). Used a bar chart with my sorted data, but disabled the x axis labels. Integrated an array indicator on the bottom that's dynamically adjusted. As long as your sizes stay the same (and no x scaling) this will work fine. 

At least I have chicken
0 Kudos
Message 3 of 3
(3,025 Views)