SVG Chart: HELP!!!
I am trying to create a pie chart like this one http://htmldb.oraclecorp.com/pls/htmldb/f?p=558:6:10625455385870944353:::::
However, I am not sure what the code should be to make the chart change as the user selects different options from the drop down menu.
I am also having trouble calculating an SVG chart that shows percentages. This is the code I am using, based on the tutorials:
select null link, COMPETITORS_1 label, count(COMPETITORS_1) value
from ORACLEDIRECTCAMPAIGNS
And I get this error ORA-00937: not a single-group group function.
Please help! Thanks!!!
Try taking the semicolon ";" off the end of the SELECT statements.
Mike
Similar Messages
-
SVG: Chart error: ORA-20001:
Hi,
We are using 1.6.1.00.02 . I got a problem with SVG chart. The query returns following error:
SVG: Chart error: ORA-20001: bar_char_error ORA-20001: get_data_error: ORA-20001 Fetch error: ORA-01782
The column names are correct. The same query works perfectly in HTMLDB reports.
Following is the query:
SELECT
TRANSACTION_dATE,
SUM(SALES) SALES,
SUM(COST_OF_SALE) COST_OF_SALE
fROM HTML_SALES_REPORT_View
WHERE transaction_date between
'01-DEC-2004' and '31-DEC-2004'
GROUP BY TRANSACTION_DATE
Help will be appreciated.
Regards,
HamayunHi,
you have to use the following syntax:
SELECT link, label, value
Example
SELECT
null link, TRANSACTION_dATE label,
SUM(SALES) value ,
fROM HTML_SALES_REPORT_View
WHERE transaction_date between
'01-DEC-2004' and '31-DEC-2004'
GROUP BY TRANSACTION_DATE
And to display your cost_of_sale data you have to add a second series like this:
SELECT
null link, TRANSACTION_dATE label,
SUM(COST_OF_SALE) value
fROM HTML_SALES_REPORT_View
WHERE transaction_date between
'01-DEC-2004' and '31-DEC-2004'
GROUP BY TRANSACTION_DATE
because you can't display two lines with just one query.
I hope this will help.
Regards, Jörg -
SVG CHart error ORA-20001 with Stacked Bar Chart HTML DB 1.6.0.00.87
Hi,
during I put a How-To into execution (How To Create a Stacked Bar Chart) I'll get the following error code:
SVG Chart error:ORA-20001:line_Chart error:ORA-20001:
get_data error:ORA-20001:Parse error:ORA009
(see http://www.oracle.com/technology/products/database/htmldb/howtos/index.html)
This Situation occurs when i add a second series to the
chart. The first series works fine. I've used the following SQL-Statement:
select null l, sales_month, revenue from (select to_char(o.order_timestamp,'Mon YYYY') sales_month, sum(oi.quantity * oi.unit_price) revenue, to_date(to_char(o.order_timestamp,'Mon YYYY'),'Mon YYYY') sales_month_order from DEMO_PRODUCT_INFO p, DEMO_ORDER_ITEMS oi, DEMO_ORDERS o where o.order_timestamp <= (trunc(sysdate,'MON')-1)and o.order_timestamp > (trunc(sysdate-365,'MON'))and o.order_id = oi.order_id and oi.product_id = p.product_id and p.category = 'Audio' group by to_char(o.order_timestamp,'Mon YYYY') order by sales_month_order);
Please help.
Regards
DetlevWell,
I've just been struggling for a couple of hours with a cluster bar chart giving the same problem.
The problem is definitely with "ORDER BY".
I guess the graphing chart is taking the sql query as a string and then does some other manipulation on it which ends abnormally when you include the order by clause.
I presume that if you embed the query in a
SELECT * FROM (<actual query with order by>)
it might mitigate the problem.
Bye,
Flavio -
Unable to edit wizard created SVG chart query
Hi,
I have a problem with an SVG chart that one of the HTML DB wizards created.
On the generated page the wizard created a selection list item named P30_SHOW.
This item allows to choose a table column based on which an SVG pie chart is generated.
The automatically generated chart query is:
select 'f?p=106:26:&SESSION.:::RP,26:P26_CHART_FILTER,P26_VALUE:'||:P30_SHOW||','||"&P30_SHOW.",
"&P30_SHOW.", count(*)
from "TESTTABLE"
group by 'f?p=106:26:&SESSION.:::RP,26:P26_CHART_FILTER,P26_VALUE:'||:P30_SHOW||','||"&P30_SHOW.",
"&P30_SHOW."
The page with selection list and chart worked fine at first.
But then, when I edited the chart's width on the respective 'SVG Chart Attributes' tab and pressed
the 'Apply Changes' button I got the following error:
'Query cannot be parsed, please check the syntax of your query. (ORA-01741: illegal zero-length identifier)'
I only changed the chart's width, I did not touch the chart's query at all.
My theory is that HTML DB tries to validate the correctness of the chart's query.
However, the query references a session variable (P30_SHOW) that is
not defined in my development session. Consequently, the query is not valid in the
development context and is refused by HTML DB.
Now I have two questions:
1. Is my analysis correct, or are there different reasons for the error I do encounter?
2. How can I get around the problem? I'd like to use the automatically generated charts,
but also want to be able to edit them.
Thanks in advance for helpful comments.
Regards HolgerScott,
I imported the application using the import/install process. A new application ID was created but was not changed in the chart query. The link was generated by the application wizard. The chart query link is below:
select 'f?p=103:2:&SESSION.:::RP,2:P2_CHART_FILTER,P2_VALUE:'||:P6_SHOW||','||"&P6_SHOW.", "&P6_SHOW.", count(*)
from "O_DATA_COLLECTION_POINTS"
group by 'f?p=103:2:&SESSION.:::RP,2:P2_CHART_FILTER,P2_VALUE:'||:P6_SHOW||','||"&P6_SHOW.", "&P6_SHOW."
The new application id is 101. It is impossible to modify this query because of message:
"1 error has occurred
Query cannot be parsed, please check the syntax of your query. (ORA-01741: illegal zero-length identifier"
This happens even if nothing is changed in the query but just the apply changes button is pressed.
I had a similar problem with the breadcrumbs menu. The link was also pointing to the old application id 103 instead of the new application id 101. The way I got round that was to delete the breadcrumb template and create a new one. I then had to go through all the pages that referenced that and reset the breadcrumbs menu template in the region definition.
Thanks Arjen -
Hi,
I have SVG Chart, Chart Type: Cluster Bar, Vertical. I have 4 Chart Series. First:
SELECT null link, X.MESIC
FROM [email protected]
WHERE ..........
I have given dynamic Chart Series Query:
'SELECT null link, X.MESIC
FROM '||adm||'.[email protected]
WHERE .........."
but Apex write error:
1 error has occurred
Failed to parse SQL query
Please help as in what am i missing?You can either use a SQL query or a function returning SQL query as the source of your chart. Just adding some quotes to a query however doesn't make it dynamic nor a function. Try something like this:
begin
return 'select null, ename, sal from emp';
end;
Edit your existing chart source, and check "Save query without validation", so that APEX doesn't attempt to parse and validate the query when saving.
Hope this helps,
Marc -
SVG chart: length of axis-labels
Apparently there is a limitation on the length of x- or y-axis labels for a SVG chart.
Does anybody know how to display axis labels that are larger than 15 characters? Is there something that you can do with the CSS to increase the limit?Hi Jan,
not sure you are on the same as I was... but found in other thread that on the series page there is maximum rows setting defaulting to 15.
Hope that helps.
ta
alberto -
Hi Friends,
Can we have SVG charts in OBIEE11g?
If , Please share the steps to generate SVG Graph.
Help is appreciated.
Regards,
Chaitanya.PYou could embed google charts into your analysis and use their API or go down the JSON route
-
Forum Members,
Having never experienced the SVG charts in AE -v1.5- a little help is needed. It will be a simple matter for frequent uses of this function often. The following chart has been created:
select null link,
i.STATUS label,
count(i.STATUS) value
from DEV_ISSUES i
group by i.STATUS
order by i.STATUS
The labels returned are 1 & 2, however, it would be better if they were Open & Closed. How could the be archived? You help is very much welcomed.Hi,
Not 100% sure I've understood your problem, but if it is just to return 'Open' instead of 1, and 'Closed' instead of 2........ use Decode as below:
select null link,
DECODE(i.STATUS, 1, 'Open', 2, 'Closed', 'Default') label,
count(i.STATUS) value
from DEV_ISSUES i
group by i.STATUS
order by i.STATUS
Cheers,
Mike -
Hi Friends,
Thanks for sparing your valuable time i watching this thread.
I had a table with values of amounts where some values are negative also. Now I want to display those values in a Chart. I tried with the SVG Chart where it is not allowing me to start the axis with negative amount. It is prompting to enter either 0 or greater than that to start with.
Can anyone tell me which chart is best feasible to display with the following items:
I have 13 Categories (Static), Months (Dynamic, atleast 30 months will be there), Amounts for each category for each month.
I need to display this in the chart so as to better know the burn rate.
Thanks,
Sekhar.All browsers have SVG support built-in now, except for Internet Explorer that needs help. The Adobe SVG Viewer is just one of the options for that help, it is no longer supported officially, but you can still download it.
Going from SVG to Flash is throwing out much of the power you get from the openness. -
Hi everybody!
I am playing a little bit with charts at the moment.
Therefore I created a query, which takes app. 2 seconds in the SQL Command Processor.
Then I created a region with a pie chart (SVG chart).
When I run the page, it takes several minutes until the chart appears (it is unacceptable).
1.) Does anybody have an idea, why this takes so long?
2.) Has anybody a better understanding of the SVG charts? How is the chart created, when the query was run? Is it created within the webserver and just displayed in the browser plugin? Or does the webserver just prepare some data and the chart is created within the browser plugin?
3.) How can I improve the performance of creating SVG charts?
4.) Are there other possibilities existing for creating charts?
Thank you for your help in advance and best regards,
ChristianHi Christian,
There may be lots of issue about the performance of the SVG chart.As far my knowledge goes you must have install Adobe SVG Viewer to the local machine for the browser to initiate HTMLDB Webserver (which is nothing but PL/SQL embedded gateway accessed through MOD_PL/SQL) with the chart viewer plugins.Now if u have so complex query with huge records ,aggregate function and group by that might be a performance issue in case of SVG.
May be some guys from HTMLDB Team can direct us......
Cheers,
ROSY -
Convert SVG Charts to Flash in Apex 2.2.1
Hi All,
With Adobe stopping support of SVG, I am looking at updating my current charts to be flash based.
My application is currently based in an Apex 2.2.1 environment.
I understand that this can be done quite simply in version 3.0, but was wondering if this is possible to do without upgrading.
If not possible, is there any other format I can convert the SVG charts to in Apex 2.2.1.
Any help is greatly appreciated.
Thanks,
MazuHello,
The only solution I can think of is to use a third party charting engine and code an XML output for the data feed for each of your charts, which is exactlly what we have done for you in APEX 3.0 using AnyChart.
There are plenty of enhancments and security fixes between 2.2.1 and 3.0 (and soon to be 3.1) to make the choice to upgrade farily obvious.
The amount of time and effort between upgrading and building out a bunch of custom charts isn't even comparable, upgrading is much easier.
Regards,
Carl
blog : http://carlback.blogspot.com/
apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5 -
Plotting multiple series on an SVG Chart
Hi,
I am trying to plot multiple series on an SVG Chart. The moment I add a second series, I get the following error:
"SVG Chart error: ORA-20001: line_chart error: ORA-20001: get_data error: ORA-20001: Parse error: ORA-0093".
The graph fails to plot multiple series even for the same queries. The query I use is something like the following:
select null "link", substr(name,7) "Label",value "Value"
from <table>
where
<conditions>
and name in (<sub-query>)
order by name desc
I have previously used an SVG chart to plot multiple series and have never had such problems. Any help would be greatly appreciated.
I tried deleting and recreating the chart - doesn't help.
Thanks,
AswathIf you want to order the data do it via an in-line view:
SELECT *
FROM (
select null "link", substr(name,7) "Label",value "Value"
from <table>
where
<conditions>
and name in (<sub-query>)
order by name desc
) -
Hi,
I cause the following error to be raised when trying to save (Apply Changes) the query for an SVG chart:
ORA-20001: set_attribute error: ORA-01461: can bind a LONG value only for insert into a LONG column
The query just got 'longer' which prompts the question:
Is there an upper limit to the length (number of characters) of the query ?
Thanks for all and any help,
sinclairI cannot answer your direct question, but if your SELECT statement is hard-coded and not generated from PL/SQL, I can offer a possible work around. You could create a database VIEW using your SELECT statement and query the view in your SVG chart.
Mike -
Hi,
I am trying to build a page that displays an SVG pie chart with the following query:
SELECT '', "&P4_SHOW.", count(*)
FROM "MY_TABLE"
GROUP BY null, "&P4_SHOW."
ORDER BY "&P4_SHOW."
where P4_SHOW is a list of columns of the table 'MY_TABLE'.
However, I get the following error when I try to save the chart definition:
Query cannot be parsed, please check the syntax of your query. (ORA-01741: illegal zero-length identifier)
Thanks for your help.you're unfortunately not going to be able to build your svg chart off that query in the current build of html db. to explain the issue real quickly, P4_SHOW doesn't have state while you're working in the development environment. because of that, your query's being run as something like...
SELECT '', "", count(*)
FROM "MY_TABLE"
GROUP BY null, ""
ORDER BY ""
...and you'll get that same "illegal zero-length identifier" in sqlplus if you try to run it there. we'll hopefully be able address this issue in a post-production release of the tool, but the best work-around for now would be for you to add multiple svg regions to your page. have one region per column of MY_TABLE and conditionally display the appropriate region based on P4_SHOW.
hope this helps,
raj -
SVG chart x axis values out of order
Hi
I have an application built in apex 3.0 that is running from apex 3.1.
It has an SVG chart with an x axis that displays the dates as
01-JUN-2008
01-MAY-2008
02-JUN-2008
02-MAY-2008
03-JUN-2008 etc.
what is wanted is that it displays the dates as
01-MAY-2008
02-MAY-2008
01-JUN-2008
02-JUN-2008
03-JUN-2008 etc.
I did not build this application so how do I start to debug this chart and get it to display the dates in sequential order.
Sorry, I know I have probably not given you much info but hopefully you can give me some pointers.
regards
TonyHi Tony,
Did you find your answer?
Try looking at this post.
order x-axis in svg-graph by date
you will need to create a subqueary
something like
SELECT DATE, OTHER1
FROM (SELECT DATE, sum(OTHER) as OTHER1
FROM MY_TABLE
group by DATE)
order by DATE
This worked for me.
Peter
Maybe you are looking for
-
Lost album art when upgraded to itunes 6.0.4
I just upgraded to Itunes 6.0.4 and now all of my album art is gone. Anybody else have this happen? Any ideas about what to do? Mac OS X (10.4.5)
-
Dashboard prompt value not carried over to report in a Link on Dashboard
The Dashboard prompt value is not carried over to the report displayed as a link on the dashboard. The report has the 'Is Prompted' filter. It does not work in both cases: 1. when the report in the shared folder is specified in the link. 2. when the
-
Hi all, when a PO is created a message is created too. Now I have to develop an application that search some OdA and if the message (table nast for understanding) isn't print yet, the program has to print it automaticaly. There is any bapi or functio
-
Firefox works good but in a few minutes they stops and appear "no response". In a minute they starts running well. That´s repeat every time.
-
Dear Colleagues, Can the HANA database been patched without downtime/restart? Regards, Alexander