Line chart grouping of dates on x-asis

  1. #1

    Line chart grouping of dates on x-asis

    Hello everyone,

    When creating a line chart i am putting prices on the y-axis and dates on the x-asis.
    One date can occur more than once.
    What happens is as following: for example i have 6? on 12/10, and 4? on 12/10.
    Both prices come to be on one 12/10 point but the dates repeat themself and dont get grouped. (screenshot attached) Click image for larger version. 

Name:	Grafiek.jpg 
Views:	190 
Size:	57.5 KB 
ID:	4157

    This is the code i use for the chart:

    <ext:Chart ID="chrtShipments" runat="server" Animate="true" StoreID="strChartData" Shadow="true" Legend="true" AutoHeight="True" Width="950" Flex="1">
                                <LegendConfig Position="Right" />
                                <Axes>
                                    <ext:NumericAxis Grid="true" Fields="PriceOfShipment" Title="Vrachtprijs ? per ton" />
                                    <ext:CategoryAxis Fields="DateOfShipment" Position="Bottom" Title="Datum" />
                                </Axes>
                                <Series>
                                    <ext:LineSeries Axis="Left" XField="DateOfShipment" YField="PriceOfShipment">
                                        <HighlightConfig Size="7" Radius="7" />
                                        <MarkerConfig Type="Cross" Size="4" Radius="4" StrokeWidth="0" />
                                        <Tips ID="Tips1" runat="server" TrackMouse="true" Width="110" Height="40">                            
                                            <Renderer Handler="this.setTitle(storeItem.get('PriceOfShipment') + ' ? per ton op ' + storeItem.get('DateOfShipment'));"></Renderer>
                                        </Tips>
                                    </ext:LineSeries>
                                </Series>
    </ext:Chart>
    I have tried to use time axis instead of the category, or tried to use the time of the date but its all the same.

    Any ideas?
    Thank you!

    Naomi
  2. #2
    Hi Naomi,

    Well, CategoriesAxis (and, I think, the others as well) can't group the same values.

    Also I'm not sure how LineSeries should draw such chart.

    Lets imaging the following points:
    (1, 1)
    (2, 2)
    (2, 3)

    So, the chart should look something like this.
    Click image for larger version. 

Name:	Chart.jpg 
Views:	140 
Size:	15.7 KB 
ID:	4345
    I don't think a single LineSeries could draw such chart.

    Probably, using two LineSeries could be a solution.

Similar Threads

  1. [CLOSED] Chart Line
    By pdcase in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Aug 14, 2012, 3:25 PM
  2. Replies: 2
    Last Post: Aug 13, 2012, 2:12 PM
  3. [CLOSED] column chart label line wrapping
    By CarpFisher in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Jul 05, 2012, 12:12 PM
  4. Replies: 1
    Last Post: Jun 02, 2012, 7:12 AM
  5. How to change a line style on the chart?
    By Natalie in forum 2.x Help
    Replies: 3
    Last Post: May 16, 2012, 11:15 AM

Tags for this Thread

Posting Permissions