Our pure JavaScript Scheduler component


Post by neric »

Hello, I have a a Scheduler with multiple summaries in the config object

     summary: {
        summaries: [
          {
            label: "summaries1",
            renderer: ({ startDate, endDate, events }) => {

          return `a value 1`;
        },
                  {
        label: "summaries2",
        renderer: ({ startDate, endDate, events }) => {

          return `a value 2`;
        },
      },

I also have a summary defined for a column

column: [      {
        text: "column name",
        field: 'name',
        type: 'tree',
        // Resize to fit the largest content. Is also triggered when expanding/collapsing a child
        autoWidth: true,
        renderer: (props) => props.record.data.name,
        sum: 'count',
        summaryRenderer: ({ sum }) => `${sum} ${sum > 1 ? "test": "tests"`,
      }]

I've managed to complety remove summary feature from a custom button by simplfy using

instance.features.summary.disabled = true

and setting it to false to re-enable it.

But I wonder if I could only hide the summaries inside the features part, but still keep the summary froms the columns ?

With pictures, from something like this:
Image

To something like that:

Image

Thank you very much for your answers


Post by mats »

So you want to hide the summaries in the time axis section during run time? Easiest way would be for you to use your own CSS class and toggle it on the outer Scheduler element.

.yourCSS .b-sch-summarybar.b-sch-timeaxiscolumn {
    visibility: hidden;
}

Post by neric »

It could do the trick, thanks a lot


Post Reply