Problem with PDF Export With Second Scale

I’m having problem with online export when using a second scale on the calendar. (see: imgur.com/a/jewUY)

1st image is with the second scale and 2nd image is without the second scale. (i’d like the PDF to be exported like the 2nd picture while still using the second scale in the view) Is there a way to exclude the second scale from the PDF but not the view??

Ideally I’d like to see the PDF as I see it here (imgur.com/bPFmF2w)

private TimelineView ConfigureTimelineView(DateTime currentDate)
{
TimelineView timeline = new TimelineView(“timeline”, “assignee_id”);
timeline.Label = “Month”;
timeline.RenderMode = TimelineView.RenderModes.Cell;
timeline.FullEventDy = true;
timeline.X_Date = “%j”;
timeline.X_Unit = TimelineView.XScaleUnits.Hour;
timeline.AddSecondScale(TimelineView.XScaleUnits.Month, “%M”);
timeline.Set(“round_position”, true);

        timeline.X_Step = 24;
        timeline.X_Size = 30;  // Always show 30 days
        timeline.X_Length = 1;

        timeline.SectionAutoheight = false;
        timeline.Dy = 20;
        timeline.TabClass = "dhx_cal_tab_last";

        // Initialize to show all members by default
        CalendarUtilities calUtils = new CalendarUtilities(UnitOfWork);
        timeline.AddOptions(calUtils.GetAllMembersUserGroup(currentDate).Members);

        return timeline;
    }

PDF export will reflect the visible scheduler.
So, if on a moment of export, scheduler has a second scale - it will be included in the export.

You can use a code, which will reconfigure a scheduler to show a single scale line, call export API, and reconfigure scheduler back to two scale lines.

How do I remove the second scale and then add it back in JS?

Hello,

You can add or remove the second scale by using the second_scale parameter:
docs.dhtmlx.com/scheduler/timeli … econdxaxis

I’m configuring the second scale in the MVC Controller for the Calendar… so how do I get a reference to the second scale in the JS so I can hide the second scale, export pdf, and make second scale visible again?

scheduler.matrix[‘timeline’].second_scale.hide;

does not work :angry: