"Scrolled" Legend in DS 1.3 charts
Hi,
After upgrading DS from 1.2 to 1.3 I observed strange behaviour of legend in one of my charts.
After the upgrade legend entries are squeezed to one row only and a scrollbar appears below, so not all labels are visible for user.
BEFORE in DS 1.2
AFTER upgrade in 1.3 (same in patch 0 and in patch 1 released yesterday).
Did you have same issue? Is there any setting where I can change legend behaviour so it will look like in 1.2 version?
Thanks for help,
Pawel
Hi,
Improvements were introduced with respect to chart legends in Design Studio 1.3 (SP0 & SP1), with the introduction of the scrollbar to facilate legends with large text/keys and large number of entries in the legend area.
However I see that this presence of the scrollbar is not ideal in this use case, if you wish to revert to the previous legend layout, please check the "Hierarchical" checkbox within the Additional Properties pane.
You should now see the legend displayed within the chart on multiple lines (as it was in DS 1.2), with no scrollbar present.....
Best regards,
Brian
Similar Messages
-
How to scroll the content of an XY chart?
Is it possible to scroll the contents of a chart? I want to keep a fixed Y axis and scroll the X axis. If the chart is placed inside a ScrollPane, then Y axis, legend, and chart title can be scrolled out of the view...
John,
thanks for the suggestion. I could find that css selector with the help of a decompiler (most of the chart sources are not yet released). However, to reparent this into a scrollpane required me to subclass the chart. This is because the chart itself is the parent of the content but it does not expose its children (which are protected in the Parent class). The problem is now that the chart does not show. I can only see the title and legend, no axis and no content. What am I doing wrong?
import javafx.application.Application;
import javafx.collections.ObservableList;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.chart.Axis;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.scene.chart.XYChart.Data;
import javafx.scene.control.ScrollPane;
import javafx.stage.Stage;
public class ScrollableChart extends Application
public static void main(String[] args)
Application.launch(args);
@Override
public void start(Stage stage) throws Exception
Parent root;
MyLineChart chart = createLineChart();
if (true)
// Scroll chart content - does not show chart currently.
Node chartContent = chart.lookup(".chart-content");
chart.getChildren().remove(chartContent);
ScrollPane scroll = new ScrollPane();
scroll.setContent(chartContent);
scroll.setFitToHeight(true);
chart.getChildren().add(scroll);
root = chart;
else
// Scroll chart incl axis etc.
ScrollPane scroll = new ScrollPane();
scroll.setContent(chart);
scroll.setFitToHeight(true);
root = scroll;
stage.setScene(new Scene(root, 1024, 768));
stage.show();
public static class MyLineChart extends LineChart<Number,Number> {
public MyLineChart(Axis<Number> paramAxis, Axis<Number> paramAxis1) { super(paramAxis, paramAxis1); }
public ObservableList<Node> getChildren() { return super.getChildren(); }
private MyLineChart createLineChart()
final int CNT = 500;
final NumberAxis xAxis = new NumberAxis(), yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
xAxis.setAutoRanging(true);
final MyLineChart lineChart = new MyLineChart(xAxis, yAxis);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series<Number, Number> series = new XYChart.Series<Number, Number>();
series.setName("My portfolio");
ObservableList<Data<Number, Number>> data = series.getData();
for (int i = 1; i <= CNT; i++)
data.add(new XYChart.Data<Number, Number>(i, 50 * Math.random()));
lineChart.getData().add(series);
lineChart.setPrefWidth(CNT * 10);
return lineChart;
} -
DAX formula and Legend/Series variable on line chart
What I am trying to do is to find a DAX function that will not cumulate the 'startyear' variable (2006-2012) that is in the Legend/Series in a pivot table for a line chart I have (see below image of chart). The below functions just cause the startyear values
to cumulate all together (2006+2007+2008....) instead of treating the years as separate values:
=(CALCULATE(countrows(s1Perm1),FILTER(ALLSELECTED(s1Perm1),s1Perm1[ExitMonthCategory] <= MAX(s1Perm1[ExitMonthCategory]))))/(CALCULATE(COUNTROWS(s1Perm1),ALL(s1Perm1[Exit],s1Perm1[ExitMonthCategory])))
Does anyone know how to change the above DAX formula or have another one that will allow the values in the Legend/Series variable to cumulate individually?Yes, it is a count, but they also must meet the criteria in the slicers chosen by the user.
Regardless, I tried your suggestion and unfortunately, it did not work--in that the year values in the Legend/series are still aggregating together, rather than individually--ie. the numerator below for 2007 and 2007 are combined:
StartYear
Values
2006
2007
ExitMonthCategory
Den
Num
CumPercent
Den
Num
CumPercent
0.5
243
30
12.3 %
168
30
17.9 %
1
243
37
15.2 %
168
37
22.0 %
2
243
53
21.8 %
168
53
31.5 %
3
243
63
25.9 %
168
63
37.5 %
4
243
75
30.9 %
168
75
44.6 %
5
243
92
37.9 %
168
92
54.8 %
6
243
104
42.8 %
168
104
61.9 %
12
243
175
72.0 %
168
175
104.2 %
18
243
218
89.7 %
168
218
129.8 %
24
243
262
107.8 %
168
262
156.0 %
30
243
289
118.9 %
168
289
172.0 %
36
243
302
124.3 %
168
302
179.8 %
42
243
306
125.9 %
48
243
309
127.2 %
168
309
183.9 %
54
243
318
130.9 %
168
318
189.3 %
60
243
320
131.7 %
66
243
321
132.1 %
72
168
324
192.9 % -
Legend Problem in multiple series chart
Hello,
I am getting problem in displaying legend. I have created a chart with multiple series and custon color. Here is my code. You can copy paste it.
Out of 3 only one legend marker n label coming.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
[Bindable]
public var SMITH:ArrayCollection = new ArrayCollection([
{date:"22-Aug-05", close:41.87, close2:45.23},
{date:"23-Aug-05", close:45.74, close2:40.90},
{date:"24-Aug-05", close:42.77, close2:46.99},
{date:"25-Aug-05", close:48.06, close2:40.22},
[Bindable]
public var DECKER:ArrayCollection = new ArrayCollection([
{date:"22-Aug-05", close:157.59},
{date:"23-Aug-05", close:160.3},
{date:"24-Aug-05", close:150.71},
{date:"25-Aug-05", close:156.88},
]]>
</mx:Script>
<mx:Style>
ColumnChart {
paddingLeft:20;
paddingRight:20;
paddingBottom:10;
paddingTop:10;
Legend {
paddingLeft:20;
paddingRight:20;
paddingBottom:20;
paddingTop:10;
</mx:Style>
<mx:Stroke id="axisStroke"
color="#000000"
weight="2"
alpha=".75"
caps="round"
/>
<mx:VBox width="500" height="500" borderColor="#000000" cornerRadius="20" themeColor="#009DFF" borderStyle="solid" borderThickness="1" horizontalAlign="center" x="246.5" y="61">
<mx:ColumnChart id="multipleChart" showDataTips="true" width="100%" height="100%" seriesFilters="[]">
<mx:horizontalAxis>
<mx:CategoryAxis id="h1" categoryField="date"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
<mx:AxisRenderer placement="bottom" axis="{h1}">
<mx:axisStroke>{axisStroke}</mx:axisStroke>
</mx:AxisRenderer>
</mx:horizontalAxisRenderers>
<mx:verticalAxisRenderers>
<mx:AxisRenderer placement="left" axis="{v1}"><mx:axisStroke>{axisStroke}</mx:axisStroke></mx:AxisRenderer>
<mx:AxisRenderer placement="right" axis="{v2}"><mx:axisStroke>{axisStroke}</mx:axisStroke></mx:AxisRenderer>
</mx:verticalAxisRenderers>
<mx:series>
<mx:ColumnSeries id="cs1" horizontalAxis="{h1}" dataProvider="{SMITH}" xField="date" yField="close" displayName="Smith" fills="#6693B0">
<mx:verticalAxis>
<mx:LinearAxis id="v1" minimum="40" maximum="50"/>
</mx:verticalAxis>
</mx:ColumnSeries>
<mx:ColumnSeries id="cs3" horizontalAxis="{h1}" dataProvider="{SMITH}" xField="date" yField="close2" displayName="Smiths" fills="#86D1E4">
</mx:ColumnSeries>
<mx:LineSeries id="cs2" horizontalAxis="{h1}" dataProvider="{DECKER}" xField="date" yField="close" displayName="Decker">
<mx:verticalAxis>
<mx:LinearAxis id="v2" minimum="150" maximum="170"/>
</mx:verticalAxis>
<mx:lineStroke>
<mx:Stroke color="#CC3300" weight="1"/>
</mx:lineStroke>
</mx:LineSeries>
</mx:series>
</mx:ColumnChart>
<mx:Legend dataProvider="{multipleChart}" horizontalAlign="center" direction="horizontal"/>
</mx:VBox>
</mx:Application>I've run into this, too:
Remove the fills property from each ColumnSeries and it'll work.
If you want to use the fills property, you'll have to add your own custom legend code.
From the Flex API:
"If you specify the fills property and you want to have a Legend control, you must manually create a Legend control and add LegendItems to it." -
A Problem about Legend in Designing Crystal Reports Chart
Hi, everyone, I'm here again.
I'm designing a chart in CR designer. As is shown below.
When I print the chart with color, it is perfect.
But when I print with only black and white, it is hardly to recognize which is C1, which is C2, which is C3..........
So I want the legend show different shapes, for example, C1 -- round, C2 -- rectangle, C3 -- star.........
like the below picture.
Legend I want
So, how can I do to accomplish it.
Thanks.Hi Sastry,
First I don't fully understand the "marker" you mentioned == legend I said?
I mean this
If they are the same,
I tried your method but It seems work not well.
In the design mode, I can only select the whole chart, as is shown below.
then I can only do a little with the marker, set the marker location and color.
But I can't change the shapes.
So is there something wrong? -
Legend datatable error in the chart
Hi there
Currently I am working with WAD BI70 and I have a problem when I try to put the data table as a legend in the chart, It mark an error "No data table information received from the ISM," the fact is that It just happened to 3 views, the same report I have other views of the same query on them and I do not mark the error.
I hope that you can help
GreetingsHi Kai
I am using a chart with a series of columns surface, but I have other similar in nature and function well, the problem is only with this report. While I do not find the reason of the error, may see is the definition of query, but still not passing ...
Thanks for your help -
Displaying legends on the bar in chart
Hi,
In webi report, can we display the value of the legend directly on the bar instead of displaying it on the x- axis or y-axis
Requirement is highlighted in the attached image.Is it possible in webi reports? Any work around?
Thanks,
DivyaHi Divya,
Please try following steps to achieve desire output :
1. Right click on chart -> Go to “Format Chart”.
2. In Global Tab > Area Tab > Select “Area Display” > Check the option called “Data Label Displaying Mode” in “Data Values.
3. Next Step > Go to “Data Values” > Set Data type to “Label”.
4. Output:
Regards,
Veer S. -
Formatting the legend of a stacked bar chart
Hi,
Is it possible to change/edit the legend part of a stacked bar chart right now I am getting the legend as"
[Color Code1] Sum of [TableName].Column Name1
[Color Code2] Sum of [Table Name].Column Name2
[Color Code3] Sum of [Table Name].Column Name3
etc...
and I would like this to be displayed as
[Color Code1] Column Name1
[Color Code2] Column Name2
[Color Code3] Column Name3
Thanks,
ii xi
Edited by: ii.xii on Jan 9, 2012 4:47 PMWell, the only way to edit that is to select the Legend entry (In Preview Mode Only) > Right-click > Edit Axis Label.
You would need to do this for every Legend entry.
-Abhilash -
Legend and bars colors on charts not consistent.
Using Crystal XI, I have a report that selects a top 10 categories in the report. For each of the 10 categories, I have 4 stacked bar charts showing "dispatched" and "not dispatched". I also have 1 subreport that charts two trend lines(one for "dispatched" and one for "not dispatched").
The problem is the color of bars/lines are not holding the same colors for "dispatched" and "not dispatched" from chart to chart. I verified each chart is sorted in the same manner, but that doesn't seem to matter.
I need "dispatched" to be the same color bar/line on all charts for each category and the same for "not dispatched".
Does anyone have any idea as to why this might be happening or how I may be able to prevent this?
I have tried to changing each chart manually, but if the category changes at the next run, the colors are randomly selected again.I can try... First, be sure you are in design mode, not preview. Right click the chart and select chart expert.
The fifth tab over should be "Color Highlight" click on new, in the item editor section ( to the right ) you should
be able to select a item from your database, as well as a condition... ie customer region is equal to auckland
You can select a color below this section. Since you are changing this in the design mode, it should apply to
the chart every time it appears in the report.
Not the best solution, but it should work for your situation. -
Adding a scroll bar to the legend in flex 4
How can i add a scroll bar to the legend in Flex 4?
I am to scroll the bars in the bar chart but i am unable to scroll the legend items.
Can anybody help me out as soon as possible?Hello,
The feature you are looking for is not there in Adobe Muse.
I would suggest you to post this as a feature request on our "Ideas for features in Adobe Muse" section of the forums : http://forums.adobe.com/community/muse/ideas
You might see this feature in future releases of Adobe Muse.
Hope this helps.
Regards,
Sachin -
Flash Chart : Percentage values in the pie chart and values in the legend
Hi All,
Query is :
SELECT null link
,GN.region Region
,ROUND(100*ratio_to_report(COUNT(DISTINCT GN.submittedbyemail)) over (),2) value
FROM goodnews_stories GN
GROUP BY GN.region
I use the above query to display the flash pie chart percentage values.
The values are displayed in percentage in legend as well as on the chart.
I need to display the values in the legend and percentage values in the chart.
How this can be achieved ?
Regards,
ArchanaHello,
Can we do this using apex? I have observed in legend as well as on chart it displays the same values which are generated by the sql query.
Regards,
Archana -
Is there a way to display the legend for a chart, but not the chart?
Hi,
I have a stacked column chart and a line chart on top of each other. I can't use the legend for the stacked column chart because the data will change from month to month, and the 2 charts will not be aligned. I copied the stacked column chart to another part of the canvas and want to display only the legend, but the chart is still displaying. Is there a way to prevent the chart from displaying? Thanks.hi Jim Wojewnik,
we can show only the legend in a pie chart by dragging the edges to closer.do the following,
select the pie chart,select the edge of the chart and make it small and u ll find the pie chart shrinking.make it lean such that the pie chart disappear.
try this work around and let me know.
regards,
ravi. -
I have bar chart with legend. I can change chart sort order from Chart Expert. When I change order in chart I can not see same order in legend list. How can I change legend sort order.
Go through the following SAP Note
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303330333933313335%7D.do]
Regards,
Raghavendra -
Chart legend too wide when using horizontal layout
I am using a flex chart with about 15 series on it. I've set
the legend direction variable to "horizontal". However since the
panel width which contains the chart is fixed, the legend sprawls
out to the right instead of going "wrapping around" nicely to stay
within the panel. As a result, you can't read the whole legend when
looking at the chart. The chart itself stays the proper width, but
the legend is too wide and can only be seen via using the scrollbar
to move horizontally. How can that be fixed?Solerous, you must create a custom legend. Here's an example
that uses a grid to lay out the individual grid items. If you have
a variable number of series, then you can probably come up with
better logic for laying out the legend, but this should help get
you going.
hth,
matt horn
flex docs
<?xml version="1.0"?>
<!-- charts/CustomLegendInActionScript.mxml -->
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
backgroundColor="white" creationComplete="init()">
<mx:Script><![CDATA[
import mx.containers.GridItem;
import mx.containers.GridRow;
import mx.graphics.SolidColor;
import mx.graphics.IFill;
import mx.charts.LegendItem;
import mx.charts.Legend;
import mx.collections.ArrayCollection;
[Bindable]
public var expenses:ArrayCollection = new ArrayCollection([
{Expense:"Taxes", April:2000, May:321, June:131, July:1100,
August:200, September:1400, October:42},
{Expense:"Rent", April:1000, May:95, June:313, July:600,
August:400, September:200, October:52},
{Expense:"Taxes", April:2000, May:321, June:131, July:90,
August:500, September:900, October:300},
{Expense:"Bills", April:100, May:478, June:841, July:400,
August:600, September:1100, October:150}
private function init():void {
for (var i:int = 0; i < myChart.series.length; i++) {
var li:LegendItem = new LegendItem();
li.label = myChart.series
.displayName;
var sc:SolidColor = myChart.series.getStyle("fill");
li.setStyle("fill", sc);
var gi:GridItem = new GridItem();
if (i < 3) {
// First row
gi.addChild(li);
gr1.addChild(gi);
} else if (i >= 3 && i < 6) {
// Second row
gi.addChild(li);
gr2.addChild(gi);
} else if (i >= 6) {
// Third row
gi.addChild(li);
gr3.addChild(gi);
]]></mx:Script>
<mx:Panel title="Bar Chart with Legend" width="500"
height="600">
<mx:BarChart id="myChart" dataProvider="{expenses}"
height="400" showDataTips="true">
<mx:verticalAxis>
<mx:CategoryAxis
dataProvider="{expenses}"
categoryField="Expense"
/>
</mx:verticalAxis>
<mx:series>
<mx:BarSeries xField="April" displayName="April (in
$USD)"/>
<mx:BarSeries
xField="May"
displayName="May (in $USD)"
/>
<mx:BarSeries
xField="June"
displayName="June (in $USD)"
/>
<mx:BarSeries
xField="July"
displayName="July (in $USD)"
/>
<mx:BarSeries
xField="August"
displayName="August (in $USD)"
/>
<mx:BarSeries
xField="September"
displayName="September (in $USD)"
/>
<mx:BarSeries
xField="October"
displayName="October (in $USD)"
/>
</mx:series>
</mx:BarChart>
<mx:Grid id="myGrid">
<mx:GridRow id="gr1">
</mx:GridRow>
<mx:GridRow id="gr2">
</mx:GridRow>
<mx:GridRow id="gr3">
</mx:GridRow>
</mx:Grid>
</mx:Panel>
</mx:Application> -
Pie chart legend total does not calculate correctly
Hi All
I have a pie chart in a CR 2008 report (SP0).
The pie has one "On Change Of" and one "Show Value" field.
The datasource for the report is an Oracle 10g (Rel 2) Stored Procedure (SP).
The SP signs the value per each transaction (record), so if the txn is a reversal is will arrive in the report as a negative value
The records that are listed in the report have the correct sign on each line, and totals in the report are correct
So, if the first record has a value of 10,000 - these would be known as Cash txns
and the second record has a value of -5,000 - these would be known as Cash Reversal txns
The report total will be 5,000
In the legend entry of the pie chart the values per series are being displayed correctly. There is a series per Txn type (so one series represents Cash txns, the second series represents Cash Reversal txns)
From the example above my pie shows 1 txn for Cash @ 10,000
and 1 txn for Cash Reversal @ -5000 (it has the negaitve amount in brackets)
But the total in the legend is 15,000
I cannot figure out why that the legend total is not calculating correclty.
Has anyone seen this behaviour before?
Any help would be great thanks
Best regards
PatrickJust realised why.... The total is counting all txns, and my formula is not telling it that Reversal should be subtracted - duuhhhh!!!!
Maybe you are looking for
-
Can two people share an icloud account keeping their info separate
can two people share an icloud account keeping their info separate
-
Coldfusion fetch mysql query question
Hi: Here is my coldfusion code: <cfquery name = "query" datasource = "cfmysql" result = "result"> SELECT COUNT(*) FROM students WHERE gender = 'boy' </cfquery> And then I want to check if value is greater than 0. I then do: <cfif existSearchHint
-
Problem: Low resolution on websites
How can I change the resolution of images in some websites?
-
Where can one find the serial number on the package of Adobe Photoshop Elements II ?
I have tried every single approach known to man, to get my software loaded into my laptop... I cannot locate the serial number on my box of Elements II, then fournd the reddemption code.. tried to find that on the web, with no success, then called B
-
Backup test fails...
Hello all, i am on hp-ux itanium 11.31...trying to test tape backup DB having issue is 10.2.0.4 one thing to note...i have other DB on this server with different Oracle home and backup are running fine..they are 11g... i have create the link as we di