Offset in Category axis when in Column chart : Numbers
Hi,
Is there a way we can offset x-axis in a column chart? To give an example, I want to plot x=1,2,3 vs y=-1,0,1.
However, Instead of x-axis starting at '0', I want to have it start at -2. In this way, I can have an increasing order graph rather than inverting one.
I know it can be done in excel, but any idea if it can be done in Numbers?
Thx,
Swapnil.
Not something that Numbers will do without a little coercion and subterfuge).
Modification to the Table:
Column C added to contain the 'shifted' values for Y. =B+2
Column C selected as values to be charted. Category labels are picked up from Column A (a Header column).
Modifications to the chart:
Value labels on Y axis NOT displayed.
Y axis Max set to 3.5, Steps set to 7.
Text box added to contain labels to match bar heights to original (unshifted) values.
Line shape added to mark Y value of 0.
Regards,
Barry
Similar Messages
-
Hello,
I am Plotting column chart based on the data present in datagridview;Column 1(having string Data Type) as my X axis value and Column Y as my Y axis value.On Column chart click event i am fetching x axis and y axis co-ordinates of my column chart and displaying
in Label on my form.But when i click it shows "0" as my x axis cordinate for the clicked column.
As my x axis is having labels as 06:00:00-07:00:00,07:00:00-08:00:00,..........
Below is image of my application
f Chart1.Series(0).Name = "Daily Data" Then
'Chart1.Series(0).XValueType = ChartValueType.Time
Chart1.Series(0).Points(result.PointIndex).XValue.ToString()
'xval = xval.AddHours(Chart1.Series(0).Points(result.PointIndex).XValue)
Label4.Text = "Selected Coordinates are: " & Chart1.Series(0).Points(result.PointIndex).XValue.ToString & ", " & Chart1.Series(0).Points(result.PointIndex).YValues(0).ToString("f2")
End If
Else
If result.ChartElementType <> ChartElementType.Nothing Then
Dim elementType As String = result.ChartElementType.ToString()
Label4.Text = "Selected Element is: " & elementType
End If
End IfYou need to get this example from Microsoft. It is a c# project code you just run it in Visual Studio. It shows most everything you can do with a chart. It shows the vb code when you run it and click the vb tab. Near the bottom of the left tree is Appearance
- Labels etc. Also under data types there are date and time examples. This link is also in the forum faqs at the top of the chart forum posts.
Chart examples.
I think you need to tell the chart to use datetime for the labels but I am not sure how and I am not too good with them but that is why I do this to learn things. I would just look in the chart examples from the link I show. That is how I answer most of
the questions here.
Can you reproduce your problem using the simple example from the other question? Otherwise I cant really do much.
Also, most times when you make a simple example you will find the problem or at least understand it better.
So take a look and come back if you cant get it I then I will try too. -
How to add two X Axis in the Column chart?Need Help
Hi,
I have a requirement to add two X axis in the SSRS column chart.Can someone please help how to add two X axis. I tried the secondary axis for horizontal axis but current x axis is shifting to other side, second X axis is not coming.
Regards
JonHi Jon,
According to your description, you want to add secondary X axis for one series in a column chart, right?
The secondary axis is useful when comparing two value sets with two distinct data ranges that share a common category. In Reporting Services, it’s not supported to create two X axis for one series. We can create secondary X axis when there are two series
in a column chart. As we tested in our local environment, we can add secondary X axis for specific series. Please refer to the screenshots below:
So I would like to know what’s your exact needs about creating two X axis for one series. If possible please share some detail information about your data and expected looking of the chart.
Reference: Plot Data on a Secondary Axis (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu -
Vertical axis labels on column chart
I'm trying to get the x-axis labels oriented vertically on a 3D column chart, so that the labels don't overlap each other. With 2D column charts I can do this via "format>chart>format x-axis" but these options are grayed out with the 3D column chart. Is there any way to get vertical orientation on the axis labels with this chart type???
It's usually not necessary to make the axis labels vertical to keep them from overlapping in a 3D chart since when you rotate the chart the labels are vertically offset. But you're right, there's no other control for this.
Jerry -
How to display axis labels on both x and y-axis of a column chart
hi,
i have an urgent requirement of having axis labels on both x and y axis
In x-axis i got it by sorting order also but in y-axis i'm unable to do
i need in y-axis ,my column values are L1,L2,L3,----L10these shuold display in y-axis in sorting order and 0 in axis should remain as it is ..........how to take the interval ....? as of now i'm using Auto
my y-axis values shud look like 0,L1,L2,L3,L4,----L10can anyone get perfect solution
thanx in advance
luckyHi Lucky,
Per my understanding that you want to display the values(Column1) like "L1,L2,L3....L10" which comes from the "Series group" in the Y-Axis label and keep the row group in "Category group" to
display in the x-axis and Numric column(1,2,3,4) in the "Value", right?
Gernerally the lable display in the y-axis is automatically based on the value of the Numric column in the "Value" and it default is numbric labels.
I have tested on my local environment and in your scenario, i suggest to hide the axis lable of the y-axis and create an tablix to only show the one column contains the values (L1,L2,L3,L3) to display in the place of the hidden y-axis label.
Detais information about to design an new y-axis label ae below for your reference:
Create an tablix to display only the row group of the "Column1" ( for the
Column1 may have duplicate values, you can create parent row group for this column and hide the detail column by setting the "Column Visibility").
Right click the y-axis to select the "Vertical Axis Properties" and select the "Labels" on the left pane to check the "Hide Axis labels"
Select the Chart Area and in the properties set value of left=0 under the CustomPosition:
Set the border style=None for both the Chart and Column1's row group
Drag the tablix at the position near the hidden y-axis and set the size of both the chart and the tablix to make the value in the tablix row group(Column1) to be align with the y-axis label:
Right click the "Chart legend" to delete or hide the legend
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
How to position x-axis dates in column chart
I have a column chart (see below) which can have one or more series where the x-axis of the series is a date common to each series. How can I get the date label to appear in the center of each group of columns? In the case shown
here, the date label would be exactly where the blue and yellow columns touch, but if there were just one column group it should appear below the center of each column, or if there were three series, it should appear in the center of the middle column,
and so on.Hello,
I have a problem similar like this. as
already comes the positioning of the
date in the middle.
But now with Format
(double), notindateformat ("dd/
MM/YYYY").
What
can I do to have
the Format Date on my Axis X?I use
the following function
foreach (DataPoint point in series1.Points)
//DateTime mydate = DateTime.FromOADate(point);
area1.AxisX.CustomLabels.Add(new CustomLabel(point.XValue - 1, point.XValue + 1, point.XValue.ToString(), 0, LabelMarkStyle.None));
//area1.AxisX.CustomLabels.Add(new CustomLabel(point.XValue - 1, point.XValue + 1, point.XValue.ToShortDateString(), 0, LabelMarkStyle.None));
thank you
for your help -
Data tips in column charts - numbers need trimming
I want to keep the standard data tip format in my column
charts, but the numbers often look weird - even though the raw
numbers add up neatly to eg 3 decimal places, the data tip shows
15! As an example when the total of a column is 49.346, the data
tip shows "Total: 49.346000000000004". How can I stop this? I can't
find an example of how to do my own data tip function that
replicates the standard so I can round the numbers down.
Thanks.Hello,
Sorry about resurecting an old post, but I'm having the same issue. My original numbers have unknow number of decimals, and when storing them in my ArrayCollection, I was originally using Math.round(myNumber*100)/100 to keep only 2 decimals. To my surprise, chart datatips show some numbers with 10 decimals (38.4899999999 for example).
I switched to using Number(nfToVal.format(myNumber)), since I already use the same NumberFormatter to display those numbers in a datagrid.
For info, nfToVal is:
var nfToVal:NumberFormatter = new NumberFormatter();
nfToVal.decimalSeparatorFrom=".";
nfToVal.decimalSeparatorTo = ".";
nfToVal.useNegativeSign="true";
nfToVal.thousandsSeparatorFrom="";
nfToVal.thousandsSeparatorTo="";
nfToVal.precision="2";
nfToVal.rounding="nearest";
Problem still there! Numbers display correctly as strings after being formatted, but get decimals again when converted back to numbers ...
Any hints ????
Thanks,
Olivier -
ORA-01722: invalid number - when last column has numbers that has a decimal seperator
Below is the sample data -
FRT,1.64,VAT,23.36
FRT,1.64,VAT,23.36
When I try to convert 1.64 to to_number all is good but when I do the same with 23.36 I get the following error
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-01722: invalid number
ORA-06512: at "SYS.ORACLE_LOADER", line 52
I tried this query as well
select to_number(CONSIGNMENT_NET_VALUE) as Col1 from DUMP_EXT
select to_number(CONSIGNMENT_NET_VALUE,'9999999999D99999','NLS_NUMERIC_CHARACTERS='',.''' ) as Col1 from DUMP_EXT --> 268906.1
getting the same error - any help greatly appreciated.
T.
SriniHi,
You can check this test case
SQL> !cat a.txt
FRT,1.64,VAT,23.36
FRT,1.64,VAT,56.36
FRT,1.64,VAT,23.36
SQL> create table DUMP_EXT
Charge_ID_FRT VARCHAR2(50),
Net_Amount_VAT VARCHAR2(50),
Charge_ID_VAT VARCHAR2(50),
Consignment_Net_Value VARCHAR2(50)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY DATA_DD_DIR
ACCESS PARAMETERS
(RECORDS DELIMITED BY '\n'
SKIP 1
BADFILE 'bad_%a_%p.bad'
LOGFILE 'log.log'
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
Charge_ID_FRT CHAR(50),
Net_Amount_VAT CHAR(50),
Charge_ID_VAT CHAR(50),
Consignment_Net_Value CHAR(50)
LOCATION ('a.txt')
reject limit 0;
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Table created.
SQL> select charge_id_frt,net_amount_vat,charge_id_vat,consignment_net_value from dump_ext;
CHARG NET_AMOUNT_VAT CHARG CONSIGNMENT_NET_VALUE
FRT 1.64 VAT 56.36
FRT 1.64 VAT 23.36
--- Get Error here
SQL> select to_number(CONSIGNMENT_NET_VALUE,'99D99','NLS_NUMERIC_CHARACTERS='',.''' ) as Col1 from DUMP_EXT
2 /
select to_number(CONSIGNMENT_NET_VALUE,'99D99','NLS_NUMERIC_CHARACTERS='',.''' ) as Col1 from DUMP_EXT
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-01722: invalid number
-- Check the Variable at DB level
SQL> SELECT value FROM NLS_DATABASE_PARAMETERS WHERE parameter='NLS_NUMERIC_CHARACTERS';
VALUE
-- Use the Query like
SQL> select to_number(CONSIGNMENT_NET_VALUE,'99D99','NLS_NUMERIC_CHARACTERS=''.,''' ) as Col1 from DUMP_EXT;
COL1
56.36
23.36
HTH -
Hi,
How do i create multiple category axis for a column chart? It
is possible in Excel. Please help me.Thank you all for helping.
Below is how I resolved :-
I created a structure of table (Key Figures) in Column of query designer and then use that structure in VC to output table.
There I had used formula for each KeyFigures using IF ...something like this:-
NVAL(IF(@Key_Figures=="Prior Sales",0,IF(@Key_Figures=="Price",NVAL(IF(#ID[ACA257]@Price_Impact_value>=0,#ID[ACA257]@Prior_Sales_Value,#ID[ACA257]@Prior_Sales_Value+#ID[ACA257]@Price_Impact_value)),IF(@Key_Figures=="FX",#ID[ACA257]@GAP_3,IF(@Key_Figures=="Volume",#ID[ACA257]@GAP_4,IF(@Key_Figures=="Lost Mix",#ID[ACA257]@GAP_5_6,IF(@Key_Figures=="Gain Mix",#ID[ACA257]@GAP_5_6,IF(@Key_Figures=="Current Sales",0,123))))))))
This way I got the output table as required.
Thanks,
Murtuza. -
Change category axis of column chart using Combobox in flex
I am trying to change the data of a column chart using a
combo box. I am using XML for data.
What I am planing to do is.. the combo box will get "Month"
say January, feb etc and same will reflect on the X axis and the
data related to only the selected month should be shown. Say if
January is selected, the x axis should show "January" and the chart
should show only data related to January.
My XML DATA
<YearlyData>
<Sample month="January" revenue="120" costs="45"
overhead="102" oneTime="23" />
<Sample month="February" revenue="108" costs="42"
overhead="87" oneTime="47" />
<Sample month="March" revenue="150" costs="82"
overhead="32" oneTime="21" />
<Sample month="April" revenue="170" costs="44"
overhead="68" />
<Sample month="May" revenue="250" costs="57"
overhead="77" oneTime="17" />
<Sample month="June" revenue="200" costs="33"
overhead="51" oneTime="30" />
<Sample month="July" revenue="145" costs="80"
overhead="62" oneTime="18"/>
<Sample month="August" revenue="166" costs="87"
overhead="48" />
<Sample month="September" revenue="103" costs="56"
overhead="42" />
<Sample month="October" revenue="140" costs="91"
overhead="45" oneTime="60" />
<Sample month="November" revenue="100" costs="42"
overhead="33" oneTime="67" />
<Sample month="December" revenue="182" costs="56"
overhead="25" oneTime="48" />
<Sample month="May" revenue="120" costs="57"
overhead="30" />
</YearlyData>
My MXML Code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="horizontal" initialize="srv.send()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
var arrBook:ArrayCollection = new ArrayCollection;
function ResHandler(event:ResultEvent)
arrBook = event.result.YearlyData.Sample;
cb.dataProvider = arrBook;
ColumnChart1.dataProvider = arrBook;
function changeChart()
cb.selectedItem = CA.categoryField
]]>
</mx:Script>
<mx:HTTPService id="srv" url="dataSheet.xml"
result="ResHandler(event)" />
<mx:ComboBox id="cb" labelField="month"
change="changeChart()"/>
<mx:ColumnChart id="ColumnChart1" width="688">
<mx:horizontalAxis>
<mx:CategoryAxis id="CA" categoryField="month" />
</mx:horizontalAxis>
<mx:series>
<mx:ColumnSeries displayName="revenue 1"
yField="revenue"/>
<mx:ColumnSeries displayName="costs 1"
yField="costs"/>
<mx:ColumnSeries displayName="overhead 1"
yField="overhead"/>
<mx:ColumnSeries displayName="onetime 1"
yField="onetime"/>
</mx:series>
</mx:ColumnChart>
<mx:Legend dataProvider="{ColumnChart1}"/>
</mx:Application>Hi Chris,
That is a Category graph (2-D Line).
A Scatter Plot will allow you to change the Scale and Steps on the X axis.
Click on the Chart (Graph) and Format Panel > Axis
To get a Connection Line or a Trendline on the Scatter Plot, Format Panel > Series
For a Scatter Plot, put your X and Y data in Header Columns (or Header Rows).
Regards,
Ian.
P.S. I see that SG has found the solution . Ian. -
In column Chart when Y values are grater than y linear axis maximum it doesnt show the Bar
Hi Guys,
In column Chart when Y values are grater than y linear axis maximum it doesnt show the Bar.But i want show the bar upto the max limit of y linear axis without changing the max limit.
Consider following example:
Y values are 80 90 200 300
and following are the output :
Left:When i am not setting maximum property of linear axis.
Right :When i am setting maximum property of linear axis to 200.
In right 4th bar is not visible bcoz value for that bar is 300 which is excedding maxium.But i want the 4th bar to appear same as 3rd bar.
How i can do this?
Thanks in advance.Are you going to show the bar going past the maximum value?
If not, then you should change the Y value when entered into the array to the maximum value allowed. i.e.
if(itemYValue > maxAllowedValue) {
itemYValue = maxAllowedValue;
Where maxAllowedValue is a variable you set on the application to control the maximum value for the chart.
This is assuming that you are loading the values into an Array before updating the chart dataprovider with that array. -
Can we reverse the category axis in Design Studio 1.3 column charts?
Hi All,
In WebI, there is an option to reverse the category axis for charts.
Do we have something similar in Design Studio? I have a requirement to reverse the order in which labels are appearing in the chart.
Please do help.
Thanks in advance for your response,
SarahSarah,
You can go to Edit > Initial View and change the sort.
Would this work for you? -
Problem with Pie chart, Store Procedure and Category Axis
Hi All,
I'm having a problem when i try to use a Pie Chart with a store procedure
when Category Axis - Field value is "none", the chart appears, but the description say Undefined
but when i put any field from store procedure, the chart doesn't show.
when I try the same with a normal SQL statement, all data was displayed
my store procedure only have 2 columns
n - numeric
state - text
The Store Procedure and the SQL, returns the same data in the same order
Thanks in advance
CristianHi guys,
I need guide on creating a system using store procedure, referring to this thread: JDBC System Connection VS BI JDBC System Connection
Hope you can help me out.
Thanks a lot,
Sarah -
SSRS 2008: how to show an empty chart with legend and x and y axis when no data available
Hi,
I am using SSRS 2008, I generated one chart in report designer with the data from Analysis Services (Cube).
According to the dataset, there is no data returned when I run the query. so when I preview the chart, there is nothing but "no data available" showing on the chart.
Here I want to know is there any possible to show an empty chart with legend and x and y axis?
If it is possible, can you tell me how can I make it?
Best Regards.
Connie ZhuHi,
When there is no data, the chart displays the message "no data available". But using a little work around, you can display an empty chart.
Please find the below steps given to achieve this
1. Create a new dataset using TSQL to return 1 row of data having the category field and value field set to 0. Add the fields that are necessary for the category fields, series fields and datafields.
A simple example would be like
SELECT 'abc' as Category, 0 as Amount
2. Add a new chart, set the category field to 'Category' and set the data field to Amount from above dataset created in step 1.
3. In the new chart, right click the category axis and select axis properties, Click on the labels tab, check on
'Hide axis labels' and then click ok
4. Now set the Visibility property of both the charts depending on the rows returned from your main dataset
a. click on your main chart and set its Hidden property to :
=iif(CountRows("MainDataSet"),false,true)
b. click on the new blank chart added and set its Hidden proprety to (the opposite) :
=iif(CountRows("MainDataSet"),true,false)
Note : Please change the dataset name in above expression "MainDataset" to the name of your chart's dataset
5. Resize the new chart to the same size as your main chart, then position the new chart on the place as the main chart.
(Note : You can set the position of new chart to be same by copying the location property from the main chart)
6. Now run and observe the result. When there are no rows returned by your main dataset, the new chart (the blank chart) should be displayed.
I've added a working sample of this kind of a report
here.
Hope this helps. Please feel free to discuss if you have any questions.
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
BH -
Hi Folks,
I would like to display the Y-axis labels of a column chart in Kilo, Millions etc. I used the below mentioned formula in excel for that set of data. Here is the formula [>=1000000]0,,"M";[>=1000]0,"K";0
Though in embedded excel it displays the values as desired, when I assign them to the column chart in Xcelsius the Y axis labels are not as expected. For Kilo it works fine but when it comes to millions it is not displaying accordingly. Any help is appreciated.
Thanks,
SukumarHi Sukumar,
If You want to display the Y Axis Labels like Kilo(k),Million(M),Billions(B)...etc.Do the following things ,
goto column chart properties->behaviour->scale in that Enable the Fixed Label size checkbox.
Regards,
Ramana
Maybe you are looking for
-
Feature Request: enhanced Frames handling in DW9
Handling of frames in DW8 is really tricky. Do it better in DW9 please. (Frames are not "out" they are accepted by search engines and cool to use. Also very userfriendly if set up right.) I frames can inserted in the code but are displayed poorly in
-
Hi Chaps, I have an SQL query that calculates a word count multiplied by a fixed figure: "...$pricegross = ($row_rsInvPending['projanalysis_total']*$row_rsInvPending['costbase']);..." Then use a bit of php code to round up the figure to 2 decimal pla
-
In Numbers 09 there was 'rearrange' which worked perfectly. New Numbers 13 has Sort by column but I can't get it to work. is there a bug?
-
Why does my ipod nano keep pausing about 10's seconds into a song
when my ipod nano 8Gb is plugged into my computer works fine. but when i unplug it it plays for abt 10=20 seconds and then it pauses..very annoying. anyone know how to fix before i throw it against a wall?
-
Regarding Deletion of a table from infoset query.
Dear Sappers, I have created a query using two tables KNA1 and BSIS..... for showing Customer Code (KNA1_....) and the Document currency(BSIS_WRBTR) I have two questions.... 1. How to delete one table either of KNA1 or BSIS from the query sq02 2. Wh