Charts - exclude less than 5% and static axis values

Hi - I have two questions.

  1. Pie charts - is it possible to create a pie chart and exclude anything less than 5? If so, how?
  2. Bar charts - is it possible to have static axis values? For example, I want to have static value of 0,5,10,15,20 for my graph. If so, how?

Thank You!!

For a pie chart you can use json.hideLabelsPercent = 5 to exclude labels for values less than 5 percent.

I’m not entirely sure what you are aiming for with bar charts, but the value axis can be controlled through json.valueAxes. For example, the following ensures the axis range is from (0, 20):

json.valueAxes = [{
	minimum: 0,
	maximum: 20
}];

If you would like to experiment with other settings, see:

You will not be able to call methods in Connect, they are not exposed. You can only set properties.

1 Like

Thank you so much! This helps me a lot. I am trying to get more familiar with charting as my company relies on them for quarterly reporting.

Actually, I do have one more question. I haven’t been able to find the answer. In the legend of a chart, is there a way to ‘hide’ anything equal to zero?

Thanks

I don’t believe there is an easy way to do that.

A not-so-easy way would be to create the legend yourself, and omit what you don’t want to see:

json.legend = { data: [
    { title: "One", color: "#3366cc" },
    { title: "Two", color: "#ffcc33" },
    { title: "Three", color: "#80ff80" }
]};

I was afraid of that. Thank you !!