How would I disable the axis labels for certain (not all) ticks?
For example, my x-axis corresponds to the start time of an event. The x-axis label shows the date of the start time. However, there may be multiple events in one day, and instead of multiple labels displaying the same date, I'd like for only the first occurrence of the date to be shown, and remaining labels with the same date hidden.
Thanks in advance.
Looked around and found this can be done with labelExclusionRanges.
From Core Plot documentation:
CPTAxis: [read, write, retain]
An array of CPTPlotRange objects. Any tick marks and labels falling inside any of the ranges in the array will not be drawn.
Related
I am trying to make a specific form of gantt-chart in Charticulator for display in Power BI. The diagram consists of:
X-axis: Start datetime for the assignment
Y-axis: group member
Width of mark: Number of minutes assignment is estimated for
Color of mark: Type of assignment
See example
Here's the problem:
As soon as I tick off the "Allow Scroll" for X-axis, all data marks disappears, and the settings for the axis changes to seemingly only have data for one day. The glyph also becomes blank with the text "to edit this glyph please add a plot segment to it", even though I just had a plot segment before selecting "Add scroll". This is only a problem for data with datetime, not if I change it to a string, which unfortunately would create other issues.
Before adding scroll
After adding scroll
Does anyone have a fix to create a x-axis with datetime with scroll?
I'm graphing weekly total page loads per 1000 students, which is easy enough when the pill for the page load variable is set to 'sum', and the date pill is set to 'week number.'
BUT, I also have a table that lists individual dates on which important policy changes occurred, and I want to draw those as vertical lines.
Using a dual axis, I have been able to plot the specific dates as lines, but because the resolution of the date axis is set to "week", it lumps all dates in the policy change table that occur within a single week into one, or possibly omits dates that don't land on the right date for that week, and therefore I don't get individual lines for every policy change.
weekly resolution, dates omitted
I have been able to approximate what I'm looking for by setting the date pill to 'day,' and then doing a rolling average of the page load values--but this doesn't represent the page loads in the way I need it to.
rolling sum, not the same calculation, but includes dates
I need either a way to layer two charts on top of each other, with different x-axis resolutions, or possibly the correct calculated field that gives me the straight up weekly sum of the daily total page loads for successive weeks, so I can use the 'day' setting on the date-time access but still get the weekly values I want, and then plot all dates in the policy change table.
Currently, I'm having trouble to force the highstock chart to display a blank space up to the current date. It focuses the data I give it.
What I have is:
What I want is something like this
As you can see I want the data to stop at the date of the latest data point and then the graph should show a blank space and stop at the current date. Obv there is not data points for those times
You can control how empty points, and missing points are shown by looking at:
xAxis.ordinal
In an ordinal axis, the points are equally spaced in the chart regardless of the actual time or x distance between them. This means that missing data periods (e.g. nights or weekends for a stock chart) will not take up space in the chart. Having ordinal: false will show any gaps created by the gapSize setting proportionate to their duration.
xAxis.max
The maximum value of the axis. If null, the max value is automatically calculated.
plotOptions.series.connectNulls
Whether to connect a graph line across null points, or render a gap between the two points on either side of the null.
Which means that for your graph, you will want to set:
xAxis: {
ordinal: false,
max: (new Date()).getTime() //to set the current date and time as a maximum
}
I am completely new to Cognos, so sorry if I don't state some necessary information. I can't go into specifics about my chart, but here is the background:
I have a SQL code running into my Query
My chart and list use the same Query and have the exact same fields
My chart is a basic line graph
When I change my aggregate function to total for my y-axis, then I can see the data points
I do not want to use an aggregate function (I need to see all the points for my x and y-axis)
My x-axis is only one object, but it has multiple y-axis values within a year (which is my series). Ex:product-cost-year list,
where my product is the x-axis, cost is the y-axis, and series is year.
How can I get my chart to appear with all my data points? Eventually, I would like to add an upper and lower confidence interval to this chart.
One way to solve this issue is to create another column that simply counts the number of products (1,2,3,...9). We will call this column count. Keep all your fields the same (product for x-axis, cost for y-axis, and year for series). You will want to add count underneath product on the x-axis. You should see your mouse pointer turn to a horizontal line and it will place it under and to the right of product. Make sure not to place it just to the right of product.
I have created a chart with 2 axes that acts as a panel chart (see image)
As a panel chart I only want to show the portions of the relevant y-axes to the chart next to them. For example, for the right-most y-axis I used a custom number format to exclude anything less than 0:
_(* #,##0_);_("";_(* 0??_);_(#_)
But for the left most y-axis, I'm stuck. I want to show -400 to positive 400. I've tried 2 different options, but neither is producing the desired effect.
[<0](#,##0);[>500000000]"";#,##0_)
[<0](#,##0);[<500000000]#,##0_);""
Here is the result I'm looking for:
I learned something new today (and a bit weird) regarding formats and chart axes
After some experimenting, this is what I ended up using:
[White][>500]_(#,##0_);(#,##0);0;
The odd part: When you change the Display Units of the axis (for me, millions), then the formatting no longer recognizes the original amount (500,000,000).
Once I figured that out, I was able to work out the solution.