Can Line Chart charts base renderer by category

I have done some Googling on this, but frankly I'm not sure
what to even search for. Here is what my boss wants:
A month by month chart of sales showing revenue trends as
well as projections for then next two months. He wants a solid line
for actual data in existing months which turns into a dotted line
with projection data for future months.
I have downloaded and played with the code from quietly
scheming (
http://www.quietlyscheming.com/blog/charts/dashed-lines/)
but it seems to apply to the entire line.
I'm not sure if the direction I should be taking is two
different line renders based on the category axis, or a way to make
the renderer smart enough to change the line at the appropriate
time.
Thoughts please?
Thanks.

I'm still playing with this solution, but for what it's worth
this is what I am doing:
I downloaded the source from quietly scheming for the dashed
line renderer. (
http://www.quietlyscheming.com/blog/charts/dashed-lines/)
I changed the DashedLineSeries to a ProjectionLineSeries and
changed the DashedLineRenderer to be ProjectionLineRenderer. Then
in the renderer, I changed the updateDisplayList method to loop
over the LineSeriesItems (_lineSegment.items array) and find where
past meets future. Note: in doing this, I made an assumption that
your xValue would be a date to use this series. I then used a
combination of the drawPolyLine and drawDashedPolyLine methods from
their respective graphics utility classes to draw the applicable
portions of the line.
Here is the contents of the
ProjectionLineRenderer.updateDisplayList method as I have it now.
override protected function
updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void
var stroke:IStroke = getStyle("lineStroke");
var form:String = getStyle("form");
var pattern:Array = getStyle("dashingPattern");
pattern = (pattern == null) ? _pattern : pattern;
graphics.clear();
var current_date:Date = new Date();
var beginning_of_month:Date = new
Date(current_date.getMonth(),1,current_date.getFullYear());
var projected_items:Array = new Array();
// Loop over the lineseriesitems
for(var i:int = 1;i<_lineSegment.items.length;i++)
// Grab the items whose dates are in the future
if(LineSeriesItem(_lineSegment.items
).xValue = beginning_of_month)
// If this is the first item that is in the future, back
// up and grab the previous one so our dotted has a starting
point
if(projected_items.length == 0 && i > 0)
projected_items.push(_lineSegment.items[i-1]);
// Add the future data points into the projected array
projected_items.push(_lineSegment.items);
// Draw the solid portion of the line. Notice the end point
is the size of the entire array, minus the future points.
// Adjusted by two because they overlap one point and the
array starts at 0.
GraphicsUtilities.drawPolyLine(graphics,_lineSegment.items,_lineSegment.start,_lineSegmen t.end,"x","y",stroke,form);
// Draw the dashed portion with the projected_items array
DashedGraphicUtilities.drawDashedPolyLine(graphics, stroke,
pattern, projected_items);
Technically, I am also assuming that the last data point is
the current month, and therefore the projected one. Based on that,
the date math is probably unnecessary, but maybe I'll change that
later.

Similar Messages

  • HTMLDB Line Chart Problem in Version 2.0

    After upgrading to 2.0, several of our line charts stopped rendering.
    It seems that if a datapoint's value is equal to zero, the line will not render.
    However if I filter out all records > 0, then the chart works fine.
    I requested a workspace(OTN) and tried it out there and ended up with the same results.
    Is this bug in the charting engine or am I missing something?? Thanks for any help.
    - George
    Steps to reproduce:
    CREATE TABLE TEST01
    (MONTH     VARCHAR2(15),
    JCOUNT NUMBER);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('OCT-04',30);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('NOV-04',40);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('DEC-04',30);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('JAN-05',145);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('FEB-05',60);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('MAR-05',50);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('APR-05',161);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('MAY-05',82);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('JUN-05',177);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('JUL-05',213);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('AUG-05',122);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('SEP-05',140);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('OCT-05',70);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('NOV-05',67);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('DEC-05',27);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('JAN-06',46);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('FEB-06',31);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('MAR-06',17);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('APR-06',15);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('MAY-06',9);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('JUN-06',5);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('JUL-06',5);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('AUG-06',1);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('SEP-06',5);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('OCT-06',0);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('NOV-06',0);
    INSERT INTO TEST01 (MONTH,JCOUNT) VALUES('DEC-06',0);
    ADD A REGION TO PAGE CONTAINING A LINE CHART;
    HERE'S THE SELECT:
    SELECT NULL LINK,MONTH,JCOUNT FROM TEST01;
    MAKE SURE TO SET THE MAXIMUM RECORD COUNT TO 50;
    THEN RUN THE PAGE
    EXPECTED RESULTS: LINE CHART WILL RENDER
    ACTUAL RESULTS: LINE CHART DOES NOT RENDER

    Looks like a bug. Oracle may be aware of it. The best workaround I could come up with is adding a very small amount to your value (JCOUNT).
    SELECT *
      FROM (SELECT NULL link,
                   month,
                   CASE WHEN jcount = 0 then .00001
                        ELSE jcount END jcount
              FROM TEST01
             ORDER BY TO_DATE(month,'MON-RR'))Only problem you have with this is if you display data point values. The value for zero JCOUNTs will display as .00001. You can work around that by picking a format mask for the "Data Label Format" value for your series.
    Mike

  • Display column values as a series/legend on a line chart where one column value can be more than one category

    Hi Everyone
    I don't know if this is possible or not, so I will describe it. I have a column in a table called Filing. There are currently three values in it ("Abuse", "Neglect", "Voluntary") and each record has this populated. I also have
    the below slicer for the column also.
    I would like to add a fourth value called "Abuse/Neglect" that would identify instances where both an Abuse and Neglect petition was filed, which is a subset of the Abuse and Neglect records in the Filing column.
    My question is, is it possible to create a line chart that has the 4 Filing possibilities: "Abuse", "Neglect", "Voluntary", "Abuse/Neglect" as the Series/Legend in the line chart?
    The problem is that there are records that are more than one category: Abuse or Neglect records can also be Abuse/Neglect.
    Paul

    Hi Paul,
    According to your description, there is a column with the values ("Abuse", "Neglect", "Voluntary") in your table, now what you need to is that add another value "Abuse/Neglect" in this column, and then use it
    as Series/Legend in the line chart, right?
    In this case, you can add calculated column to your table based on your logic. A calculated column is a column that you add to an existing PowerPivot table. Instead of pasting or importing values in the column, you create a DAX formula that defines
    the column values. The calculated column can be used in a PivotTable, PivotChart, or Power View report as you would any other data column. Please refer to the link below to see the details.
    https://msdn.microsoft.com/en-us/library/gg413492%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396
    Regards,
    Charlie Liao
    TechNet Community Support

  • Putting Category Counts in a Tool Tip on a Line Chart -SQL Server 2008 R2

    I have a line chart report that shows the total number of tickets processed each month. Within the same recordset is the data of who processed the ticket.  So I want to add in the ToolTip on the Datapoints the number of tickets processed  by each
    persion.  There are just a few people.
    So the line chart will have a datapoint at 20, but Joe did 5 and Jim did 15. What expression would I put in the tooltip? I even added datavalues for the Names and hid the data on the chart.  I am just not sure how to reference or write the expression
    that says  joe has 5 and jim has 15 in the ToolTip.  Then I would want an "Other" with all Rogues not Jim or Joe.
    Example of Data
    Ticket #  DATE_REPORTED  ASSIGNEE_FULL_NAME
    1  2013-01-16 08:31:28.000  Joe
    2  2013-01-17 07:01:23.000  Jim
    3  2013-02-04 17:42:23.000   Jim
    4  2013-02-04 18:42:23.000   Bill
    Thanks in advance.
    DBA Developer

    Hi Paul,
    As per my understanding, if we want to display some detail information depend on one field, we should add a group on that filed ahead. In your scenario, we should add a Category group or Series group in the chart, then write an expression to display the
    detail information. While, if we additional add a group in the chart, the chart would showed with other manners. It will be different from the original chart. So, I think we cannot directly achieve the goal at the moment.
    As a workaround, I suggest we can create another report to only display the detail information, then add a drill through action in the main report to jump to that report when we click the line. For more details, please refer to the following steps:
    Drag a Line Chart on the design surface of the new report.
    Insert [Count(Ticket__)] in the Values pane.
    Insert the expression below as the Category Group Label expression and Group expression:
    =format(Fields!DATE_REPORTED.Value,"MM")
    Insert the expression below as the Series Group Label expression and Group expression:
    =iif(Fields!ASSIGNEE_FULL_NAME.Value="Joe",Fields!ASSIGNEE_FULL_NAME.Value,iif(Fields!ASSIGNEE_FULL_NAME.Value="Jim",Fields!ASSIGNEE_FULL_NAME.Value,"Others"))
    In the main report, right-click the line to open Series Properties dialog box.
    Click Action in the left pane, enable Go to Report, then specify the new report name in the drop-down report.
    If we want to see the detail information, we can click the line in the main report, it navigates to the new report. Then we can click “Back to Parent Report” action to return to the main report.
    Hope this helps.
    Regards,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Getting BEx query header data into Xcelsius for line chart Category Labels?

    Hello - Is it possible to get header data from BEx queries into Xcelsius so they can be used for Category Labels in a line chart?
    We have a BEx query that displays 16 weeks of shipment trends by column and text variables are used to display the respective date selection for each of the weeks in the query header but When connecting QaaWs to Xcelsius, the header row does not get displayed.
    When using LiveOffice, the header row seems to come thru with the correct dates for each of the weeks but if you are stacking more than one connection than you will get an extra header row for each connection.
    Are there any tricks to hide a header row in a LiveOffice document?
    Is there anyway to display the header row from QaaWs in Xcelsius?
    Any other work arounds?
    Thanks,
    Derek

    Derek,
    Below are my inputs...
    -->Using QAAWS you will not be able to get the header data, so you will have to maintain header data manually in Xcelsius (Spreadsheet).
    -->Using Live office you will be able to get the header data, and if you are using multiple live office connections, then you need to use cell reference formulas and format the spreadsheet (Xcelsius) as you require.
    -Anil

  • How can I hide a segment of line in Line Chart.

    Hi, All.
    I have a problem in Crystal Report. I have a database field like this:
    ID Creation Budget Actual
    1 2007-1 30 45
    2 2007-2 30 38
    3 2007-3 30 42
    4 2007-4 30 Null
    5 2007-5 30 Null
    12 2007-12 30 Null
    This database storage the info about budget and actual
    when the first month of each year, we input all the budget of the full year.
    and we input actual data every month.
    We hope our line chart can show a line about sum(budget) of the full year:
    and another segment of line indicate the actual of the summary to current month. (eg. the data of 2007, this line will hide after 2007-4, but the budget will show all 2007 sum data)
    | /budget(sum2007-12=360)
    | /
    | /
    | /
    |/-/act(sum2007-3=125)
    What should I do? Please Help!!
    Thanks.
    Seraph

    Hi, Don.
    Thank you
    It seems that you are a SAP employee, You said "If you need quick help I suggest you purchase a case on line to get a dedicated Crystal Report Designer Engineer to help you ",
    I wanna told you that It's not work. maybe Crystal Report is a good product, but it has the worst services in China. We've brought CR product, We've brought CR services. But we never get any services from their company.
    Every time we post the information to their engineer, they never give us feedback. They donno how to do it either.  They just sell product, but never know how to keep the customer's heart.
    After SAP brought BO, I ever thought that SAP,the BEST management company in the world, would give the new life to BO. the services would be better. BUT, I was wrong..IT'S THE SAME..
    I'm not aiming at one man or one company, But I really hope the services would be better. It HELPS.
    Thank you anyway.
    btw. I'm sorry for post in a wrong fourm.
    Seraph.
    Edited by: Seraph Lew on Feb 6, 2009 8:08 PM

  • Crystal reports in jsp ,the Line chart 's line can't display in jsp?

    that is example crystal-reports-10 for Jbuild 2005,
    I just modify such in viewreport.jsp:
    <crviewer:viewer displayToolbarRefreshButton="true" isOwnPage="true" displayToolbarCrystalLogo="false" displayToolbar="true" displayToolbarExportButton="true"
    displayToolbarPrintButton="true" displayGroupTree="false" viewerName="worldsales" reportSourceType="reportingComponent" reportSourceVar="<%= path %>"><crviewer:report reportName="<%= path %>"/></crviewer:viewer>
    it can't display a Line chart rpt's line and background's picture, and when I press refresh button report a Error "Error finding JNDI name (yhgl)"
    help!!

    The jars should be in your installed Crystal Reports folder( \Crystal Decisions\..\java\lib or something like that...). The problem is that your server (Tomcat and others) ignores the system classpath completely (it sets its own in its startup script).
    Therefore, in order for Tomcat to find the jars, those jars have to be placed in in %CATALINA_HOME%\common\lib\. There, they will be available for all your applications. If you don't want them available globally, put them in your particular webapp's WEB-INF\lib directory.

  • How can i hide object in line chart?

    In Webi XI R2, i am preparing a line chart for which on x-axis i have two objects like "month name" and "month ID". The purpose of "month ID" is to sort the month name. So sorting is applied on "month ID" column. Now how can i hide this "month ID" column, but still sorting is applied so that month name is displayed in correct order.
    secondly, on the x-axis values are displaying like "AUG/00987","SEP/00988". i.e Month name/month ID. How can i make the line chart to display only month name but still sorting needs to be applied.
    Please advise.

    Hi Raveendra,
    You can try to hide the column from the webi report in a TABLE, and might just work with the table, and make them charts.
    regards,
    Shreyash.

  • How can i produce this type of line chart (yield curve) by using flex2 charting?

    help! I am a flex newcomer, how can i produce this type of
    line chart (yield curve) by using flex2 charting? Anybody can teach
    me how can i customize the width of each scales as below of line
    chart? anybody know this?
    Click
    Here To See

    I need to show the X and Y Co-ordinate in a message when I click on the graphic's point.
    thanks for the tips, I´ll try to understand the sample program.
    Noguti

  • Can't seem to draw a chart (line chart) using dates rather than numbers

    I'm trying to draw a Line Chart but rather using numbers i want to use dates for example: Switzerland 23/06/2008 - 23/08/2008. Can't seem to get it to work? it seems to all go wrong when I change the cell format to 'date'
    Can anyone help?
    Thanks
    PS. I can do it easily in Excel

    Hello
    From my point of view, it's not surprising.
    In XL, a date is a number to which a date format is applied. So, it may be charted.
    Same thing with the good old AppleWorks.
    With Numbers, a date is NOT a number, it IS a specific class of data.
    The consequence is that it can't be charted directly.
    Happily, we may easily convert a date into a number.
    In column B the formula is
    =A-$A$1
    which calculates the numeric difference between stored dates and the date stored in A1.
    So, we may chart the results.
    I know that it's far from perfect but we have to live with the choices made by Numbers's designers.
    Yvan KOENIG (from FRANCE vendredi 18 avril 2008 18:44:14)

  • Line Chart - number of values it can chart

    Is there a limit to the number of values the line chart is able to chart?  It appears when too many results are returned the chart truncates the last data points.  When I look at the data all values are present but the chart only charts the first ? values.

    Sam,
    How many values are you trying to plot on a chart.  There is not necesarily a limit but will be limited to the size of your chart and considering you can plot one point per pixel this will depend.  We recommend the option in the iChart of "Use Screen Resolution" as this will limit your data points to the size of the screen otherwise it can get very unsightly and confusing,  if you have a chart which is 640x480 and are bring back 2,000+ datapoints and plotting them this will be very confusing and most likely counter productive.
    Erik

  • How can i make x-axis even distribution in line chart?

    can i change the min value, max value of x-axis?

    For a line chart, the answer is : NO
    In this charts, the X axis isn't a numeric one. It's just one with labels.
    On the screenshot, compare the chart 2 (line one) and the chart 4 which is a scatter chart.
    This late one behave as a true numeric one and it allow us to set min and max values.
    Yvan KOENIG (VALLAURIS, France) lundi 11 juillet 2011 15:18:51 iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How can I connect dots across missing data points in a line chart?

    Hi all!
    I have a table in Numbers that I update every few days with a new value for the current date (in this case body metrics like weight, etc.), which looks something like this:
    Column 1              Column 2      Column 3
    Aug 16, 2011         87.1             15.4
    Aug 17, 2011         86.6
    Aug 18, 2011         86.1
    Aug 19, 2011              
    Aug 20, 2011         85.7             14.6
    Aug 21, 2011         85.3
    Every once in a while there will be a missing value for a given date (because I didn't take a reading on that day). When I plot each column against the date on a line chart, there is a gap where there are missing data points. The line does not connect "across" missing data points. Is there a way to make the line connect across missing data points?
    Thanks for any help. This thing has been driving me nuts!

    Leave your nuts in peace.
    Don't use line charts but scatter charts.
    These ones are able to do the trick.
    Of course to do that you must study a bit of Numbers User Guide.
    In column D of the Main table, the formula is :
    =IF(ISBLANK($B),99999,ROW())
    In column E of the Main table, the formula is :
    =IF(ISBLANK($C),99999,ROW())
    Now I describe the table charter.
    In column A, the formula is :
    =IFERROR(DAY(OFFSET(Main :: $A$1,SMALL(Main :: $D,ROW())-1,0)),"")
    In column B,the formula is :
    =IFERROR(OFFSET(Main :: $A$1,SMALL(Main :: $D,ROW())-1,1),"")
    In column C, the formula is :
    =IFERROR(DAY(OFFSET(Main :: $A$1,SMALL(Main :: $E,ROW())-1,0)),"")
    In column D, the formula is :
    =IFERROR(OFFSET(Main :: $A$1,SMALL(Main :: $E,ROW())-1,2),"")
    In this table, select the range A1 … D5
    and ask for a Scatter chart.
    You will get what you need.
    I asked that points are joined by curves
    I just edited the parameters of Xaxis and Yaxis to get a cleaner look.
    I repeat one more time that knowing what is written in the User Guides is useful to be able to solve problems with no obvious answer.
    Yvan KOENIG (VALLAURIS, France) samedi 27 août 2011 15:59:20
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Can't do detailed line chart in cfchart

    Hi
    is it possible to get a line chart suitable for say a
    financial series ie with ~1000 points of data in cfchart with
    CFMX7? I cant seem to get the line fine enough so have to limit
    chart to say 50 points. Someone must have done it but cant see any
    examples on web or adobe livedocs. I guess a follow up question is
    where is the best ref for cfchart?
    Thanks in advance
    Tim

    Hi, what did the genius mean by "everything being fried"? I'm guessing that you have a USB keyboard and mouse and they still work, right? I'm just trying to see what the extent of the damage is.
    Best,
    ~FifthWheel

  • Problems with line chart rendering

    Hi.
    I have some problems with a line chart with 2 series.
    I have the folowing series:
    SELECT null link, t.column_value eticheta, EVM_REPORT.ACTUAL_COST2(:P37_PROJECTID, t.column_value) valoare
    FROM TABLE(utils.table_for_iteration(
    to_date('2007-05-20', 'yyyy-mm-dd'), sysdate)) t
    SELECT null link, t.column_value eticheta, 7 valoare
    FROM TABLE(utils.table_for_iteration(
    to_date('2007-05-20', 'yyyy-mm-dd'), sysdate)) t
    function table_for_iteration(param_start in date,param_end in date) return DATE_ARRAY PIPELINED AS
    BEGIN
    FOR i IN 0 .. (param_end - param_start)
    LOOP
    PIPE ROW(param_start + i);
    END LOOP;
    RETURN;
    END table_for_iteration;
    FUNCTION actual_cost2(in_project_id in number, end_date IN DATE) RETURN number AS
    begin
    return 2;
    end actual_cost2;
    The chart does not display (at all). If i replace EVM_REPORT.ACTUAL_COST2(:P37_PROJECTID, t.column_value) with some value, it displays.
    Any ideea ?

    Hi,
    Do you mean point the partial trigger to the surrounding container? I have tried that but it makes no difference. I am almost certain that the problem is associated with the forEach component as if I have exactly the same structure but without the forEach then the ppr works fine.
    Thanks for your help on this,
    Dave

Maybe you are looking for

  • Re: Wireless connectivity

    I acquired my daughter's HP printer - Model D11a -  it works when connected with USB but I'd like it to work wireless.  I've had several printers and never had a problem connecting.  I followed all the instructions but it still says the password I pr

  • Having count of 1

    I would like to count how many ID have only had 1 Enrolment by year: I am assuming you would have to use having count = 1 or something like that. So I have the following example below ID 1 has 2 enrolments so dont count ID 2 has only 1 enrolment so c

  • HT1539 I downloaded a digital copy of a movie on iTunes but the extras had a download error. How do I fix this?

    I had downloaded a Digital Copy of a film with extras on iTunes the other day. The movie is working fine, the extras met with downloading errors and won't work. I've tried clicking the download button but keep getting the same error message. I've alr

  • Photo sorting criteria 9.2.1

    I think we have all noticed the change in the photo sorting criteria with the new 9.2.1 version of iTunes. Before, sorting was alphabetical. Now, it is by "date last changed" of photo. If you do not have iPhoto, there appears to be no way to change t

  • HT1544 how long should this update take?

    I am intalling leopar 10.5 on my computer. It's been "intalling" for over 3 hours now. How long should this usually take if you intall it via DVD?