How can I hide the legend in the Vaadin Charts.
I tried commenting the legend defined in the program
Legend legend = new Legend();
legend.setLayout(LayoutDirection.VERTICAL);
legend.setBackgroundColor(new SolidColor("#FFFFFF"));
legend.setVerticalAlign(VerticalAlign.BOTTOM);
legend.setShadow(true);
conf.setLegend(legend);
After commenting this, only a colour button remains on the graph.
configuration.getLegend().setEnabled(false);
Related
We often show several legends in our charts and usually even a label as footer.
The legends can be above or below the chart and thus also the footer.
If there is more than one legend, the legends should be drawn stacked up, one above the other.
For this case we use standalone legends and labels.
But we have a problem:
Since the legends and the chart are all drawn in the same container, the chart hides the legends.
We have solved the problem so that the margin of the chart is adjusted when a legend is drawn underneath it. Now the chart takes less space and you can see the legend as planned.
However, this does not work properly if there are several legends or footer.
Standalones cannot be placed with top() or left(), but only have their parent container and a position().
Manipulating the margin of each legend and the chart to fit them all in the container is not a satisfying way to do this.
There must be a better way to control the layouting of the elements within the container.
What is the right way to do this?
The position of standalone legend on the stage can be controlled using parentBounds() function. For details, check the sample.
Using VBA, how would you decrease the spacing between two lines of text in the Chart title? I generated a chart title using VBA but the vertical spacing is too large.
Also, is it possible to change the Chart title box height and width using VBA, which may fix the problem?
Unfortunately this is not possible.
No horizontal error bar can be selected in line graph
Your graph needs to be a Scatter plot to have horizontal error bars. You cannot have horizontal error bars with a Line plot.
I can easily change background color of an entire chart like:
chart.format.fill.setSolidColor("lightgray");
and I can change the gridlines in the plot area.
I want to change the fill color of the plot area. Can I do that?
Sorry. There is no Office.JS API to do that yet. We are working on such an API. I'm not allowed to predict when it will be available.
I've got a scatter chart in an SSRS report and a requiremetn to label each quadrant of the chart.
When I drop a text box with the label of each quadrant and get it to look just how I want it in the designer all seems well.
But when the report is run the flow based layout of the report put the text boxs vertically under need the scatter chart.
How do I get the text boxes to remain on top of the chart?
In designer
Rendered report
Consider adding the Quadrant labels as a chart title instead of a textbox. You will need to enable the CustomPosition property of the chart title to True in order to place the titles in the corners.
I am unable to post an image without some "reputation" but I was able to add the quadrant titles successfully.