1

I have problem to skip weekends in highcharts in my angular 2 application. I have seen in highstock there is option ordinal:true to skip weekends but its not working for me. Is there any alternative to skip weekends. This works well from Tuesday on wards.

xAxis: {
                            type: "datetime",
                            tickInterval: this.tickinterval,
                            //ordinal: true,
                            breaks: [{
                                from: this.fromdate,
                                to: this.todate,
                                repeat: this.repeat
                            }],
                            labels: {
                                formatter: function () {
                                    return highcharts.dateFormat('%H', this.value);

                                }

                            },
                            plotLines: this.plotlines,


                            max: this.maxdate,
                        },

<chart [options]="chartOptions" type="chart" class="chartstyle" style="height:50%"> </chart>

enter image description here

U rock
  • 717
  • 2
  • 13
  • 32
  • What is wrong with using breaks? What is it not doing that you want to do? – ewolden Mar 05 '18 at 12:11
  • It does not problem with breaks here i have to show previous day and current day between these i have used breaks. I just want to remove weekends. Sorry if understood wrong. – U rock Mar 05 '18 at 14:29
  • I don't think I am understanding what you are after. That said, you can use breaks to skip weekends. – ewolden Mar 05 '18 at 14:54
  • Now i understood what you mean let me try http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/stock/demo/intraday-breaks/ – U rock Mar 05 '18 at 15:07
  • I have tried weekend breaks but it is not working do i have any alternative `{ // Weekends from: Date.UTC(2018, 2, 2, 23), to: Date.UTC(2018, 2, 4, 23), repeat: 7 * 24 * 36e5 }` – U rock Mar 06 '18 at 08:40
  • 1
    Hard to say, can you post a fiddle with your code where the issue can be seen? – ewolden Mar 06 '18 at 08:46
  • Its difficult to create angular project in fiddle for me. But here i tried with Stackbiltz, again i have error that 'require' is not a function for angular2-highcharts integration so you can easily understand what is going on . https://stackblitz.com/edit/angular-w5n3uo – U rock Mar 06 '18 at 14:12
  • I think that the first thing we need to determine is what's the source of problem: Highcharts configuration or Angular. Could you provide a simplified demo in pure Highcharts? I see that you're using `angular2-highcharts` which isn't an official wrapper - maybe it's bugged. – Kamil Kulig Mar 07 '18 at 10:10

0 Answers0